Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot start the project #26

Open
HibaH1 opened this issue Mar 16, 2017 · 7 comments
Open

Cannot start the project #26

HibaH1 opened this issue Mar 16, 2017 · 7 comments

Comments

@HibaH1
Copy link

HibaH1 commented Mar 16, 2017

Hi all,
I have issues starting the project:

when I try "npm install", I have this:

npm WARN [email protected] requires a peer of angular@>=1.3 <1.6 but none was installed.
npm WARN [email protected] requires a peer of angular-animate@>=1.3 <1.6 but none was installed.
npm WARN [email protected] requires a peer of angular-aria@>=1.3 <1.6 but none was installed.

and when I try "npm start", i have the roor below:

> [email protected] start C:\Users\soat\domoTuto\advanced-sample-app
> NODE_ENV=development node server.js

'NODE_ENV' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "...\\nodejs\\node.exe" "...\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.10.0
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `NODE_ENV=development node server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'NODE_ENV=development node server.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the sample-app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     NODE_ENV=development node server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs sample-app
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls sample-app
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     ...\advanced-sample-app\npm-debug.log

Can You help me please?

Thanks

@jpumford
Copy link
Contributor

Hi!

Are you using Windows to run the npm start command? Which shell are you using?
Vous pouvez me répondre en français si c'est plus facile :)

Justin

@HibaH1
Copy link
Author

HibaH1 commented Mar 17, 2017

Hi Justin,

yes I'm using windows (node.js Command prompt)

Hiba

@jpumford
Copy link
Contributor

Thanks!

The development script sets some single-command environment variables in npm start. Our syntax only works on OSX and Linux. We'll need to address that in a future release of starter-kit or not support Windows.

In the meantime, change the "start" script in package.json from NODE_ENV=development node server.js to be set NODE_ENV=development && node server.js. Here's a diff of what it should look like:

diff --git a/package.json b/package.json
index 57fd22c..e6c0ca7 100644
--- a/package.json
+++ b/package.json
@@ -4,7 +4,7 @@
   "description": "A starter for writing Domo Apps in ES6",
   "scripts": {
     "setup": "node other/setup.js",
-    "start": "NODE_ENV=development node server.js",
+    "start": "set NODE_ENV=development && node server.js",
     "test-ci": "npm run lint && NODE_ENV=test karma start ./karma.conf.js --single-run --browsers PhantomJS",
     "test": "npm run lint && NODE_ENV=test karma start ./karma.conf.js --single-run",
     "tdd": "NODE_ENV=test karma start ./karma.conf.js --browsers Chrome",

@walexnelson
Copy link

Adding cross-env to the starter kit and changing the npm script to cross-env NODE_ENV=development node server.js would solve this for windows.

@HibaH1
Copy link
Author

HibaH1 commented Apr 9, 2017

Hi All,
Thanks for your help but I still have issues with running the project:

I have this now :

✓ Login to ....domo.com successful (using developer token)

C:\...\advanced-sample-app>npm start

> [email protected] start C:\...\domoTuto\advanced-sample-app
> cross-env NODE_ENV=development && node server.js

Session expired. Please login again using domo login.

Why it's telling me that my session is expired when it is not? Can you help me with this please?

Thanks.

@walexnelson
Copy link

@HibaH1 the advanced starter kit is using an older version of the proxy which doesn't support developer tokens. You can either authenticate with username + password or update the /other/server.es6.js file to include a check for developer token like the starter kit does. The pull request #27 should fix this when it's reviewed and merged.

Here's a direct reference to the token check that is currently being used in the starter-kit

@jpumford
Copy link
Contributor

@HibaH1 I'll look at getting the framework updates in the sample app right away!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants