dwyl / learn-redux

:boom: Comprehensive Notes for Learning (how to use) Redux to manage state in your Web/Mobile (React.js) Apps.
GNU General Public License v2.0
446 stars 42 forks source link

npm ERR! Failed at the learn-redux@1.0.0 start script 'node devServer.js'. #33

Closed Blak3Nick closed 8 years ago

Blak3Nick commented 8 years ago

I have the latest version of node and npm and I am receiving this error when trying to run npm start from the learn-redux folder. I attached the npm debug text file as per the instructions on the error.

npm-debug.txt

nelsonic commented 8 years ago

@Blak3Nick apologies for delay in response, can you please paste the contents of the npm-debug.txt into the issue description/comment so we can help debug. thanks!

Blak3Nick commented 8 years ago

0 info it worked if it ends with ok 1 verbose cli [ 'C:\Program Files\nodejs\node.exe', 1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'start' ] 2 info using npm@3.8.9 3 info using node@v6.2.0 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle learn-redux@1.0.0~prestart: learn-redux@1.0.0 6 silly lifecycle learn-redux@1.0.0~prestart: no script for prestart, continuing 7 info lifecycle learn-redux@1.0.0~start: learn-redux@1.0.0 8 verbose lifecycle learn-redux@1.0.0~start: unsafe-perm in lifecycle true 9 verbose lifecycle learn-redux@1.0.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Users\blake\OneDrive\Documents\Node\learn-redux\node_modules.bin;C:\Program Files\nodejs;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\nodejs\;C:\Program Files (x86)\Microsoft VS Code\bin\zsh;C:\Users\blake\AppData\Roaming\npm 10 verbose lifecycle learn-redux@1.0.0~start: CWD: C:\Users\blake\OneDrive\Documents\Node\learn-redux 11 silly lifecycle learn-redux@1.0.0~start: Args: [ '/d /s /c', 'node devServer.js' ] 12 silly lifecycle learn-redux@1.0.0~start: Returned: code: 1 signal: null 13 info lifecycle learn-redux@1.0.0~start: Failed to exec start script 14 verbose stack Error: learn-redux@1.0.0 start: node devServer.js 14 verbose stack Exit status 1 14 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:245:16) 14 verbose stack at emitTwo (events.js:106:13) 14 verbose stack at EventEmitter.emit (events.js:191:7) 14 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14) 14 verbose stack at emitTwo (events.js:106:13) 14 verbose stack at ChildProcess.emit (events.js:191:7) 14 verbose stack at maybeClose (internal/child_process.js:850:16) 14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5) 15 verbose pkgid learn-redux@1.0.0 16 verbose cwd C:\Users\blake\OneDrive\Documents\Node\learn-redux 17 error Windows_NT 10.0.10586 18 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start" 19 error node v6.2.0 20 error npm v3.8.9 21 error code ELIFECYCLE 22 error learn-redux@1.0.0 start: node devServer.js 22 error Exit status 1 23 error Failed at the learn-redux@1.0.0 start script 'node devServer.js'. 23 error Make sure you have the latest version of node.js and npm installed. 23 error If you do, this is most likely a problem with the learn-redux package, 23 error not with npm itself. 23 error Tell the author that this fails on your system: 23 error node devServer.js 23 error You can get information on how to open an issue for this project with: 23 error npm bugs learn-redux 23 error Or if that isn't available, you can get their info via: 23 error npm owner ls learn-redux 23 error There is likely additional logging output above. 24 verbose exit [ 1, true ]

nelsonic commented 8 years ago

Ah, ok. Windows... ⚠️ Let's get to the bottom of this! 👍 after you cloned the repo did you run the following commands:

npm install
npm start
Blak3Nick commented 8 years ago

Windows... I know. I am new to all of this and don't have a Linux system yet. I think the issue was with the way i installed Cygwin. I don't think I had the proper dependencies installed and some of my files were placed in the wrong directories. I have reinstalled everything and no longer am experiencing the same bugs. I think we could probably consider this resolved if that sounds good, and if I have any subsequent issues I could re-address them. Thank you for all your help working me through this. As I said I am a complete beginner, especially with command line programs.

naterkane commented 8 years ago

Instead of cygwin... using git-bash is a much simpler way to get started on Windows, and... it comes with git.

ALSO use nvm-windows to manage your versions of node/npm.

nelsonic commented 8 years ago

@Blak3Nick precisely because you are a "complete beginner" that we aren't going to rest until you're 100% up and running! 😉 Let us know how you get on with using git-bash ... We may even need to update the instructions in the Readme to be more beginner friendly, so _you're helping us_!!

ghost commented 8 years ago

I don't want to add noise to the conversation, deciding what tool to use is pretty messy and hard... but there's an amazing console emulator for windows (with git integrated) http://cmder.net/

Blak3Nick commented 8 years ago

This is the error I get when running the npm install command

npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.12

The if I go ahead and run npm start i get the original error 'error learn-redux@1.0.0 start: node devServer.js'

I tried installing chokidar using npm install chokidar but received the same two errors again: npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.12

nelsonic commented 8 years ago

@Blak3Nick are you able to run the following command:

node static-server.js

I think the issue might be the relative path to nodemon in the start script ...

Blak3Nick commented 8 years ago

@nelsonic This is the error I get when trying that command: module.js:442 throw err; ^

Error: Cannot find module 'C:\Program Files\nodejs\static-server.js' at Function.Module._resolveFilename (module.js:440:15) at Function.Module._load (module.js:388:25) at Function.Module.runMain (module.js:575:10) at startup (node.js:160:18) at node.js:449:3

nelsonic commented 8 years ago

@Blak3Nick did you change directory into the learn-redux directory? try: cd learn-redux (before attempting to run npm install && node static-server.js ...)

Blak3Nick commented 8 years ago

@nelsonic From the learn-redux dir after running npm install again: Cyr1lfiggus1@Cyr1lfiggus MINGW64 /c/learn-redux/learn-redux $ node static-server.js module.js:442 throw err; ^

Error: Cannot find module 'C:\learn-redux\learn-redux\static-server.js' at Function.Module._resolveFilename (module.js:440:15) at Function.Module._load (module.js:388:25) at Function.Module.runMain (module.js:575:10) at startup (node.js:160:18) at node.js:449:3

nelsonic commented 8 years ago

@Blak3Nick to confirm are you able to list the files in the directory you are in? use the dir command. does the static-server.js file appear in the list?

Blak3Nick commented 8 years ago

@nelsonic No. The following is from the ls command in the learn-redux dir: Cyr1lfiggus1@Cyr1lfiggus MINGW64 /c/learn-redux/learn-redux $ ls client/ index.html package.json webpack.config.dev.js devServer.js node_modules/ readme.md webpack.config.prod.js

nelsonic commented 8 years ago

Hmm... that list of files does not match the list for the repository: https://github.com/dwyl/learn-redux (we don't have a webpack.config ...) did you add it locally?

If you haven't made any changes, try cloning the Git repository again and starting over.

cd \
git clone https://github.com/dwyl/learn-redux.git
cd learn-redux
npm install
node static-server.js
Blak3Nick commented 8 years ago

@nelsonic Thank you so much! I don't know where I originally went wrong, but I was able to run the static-server.js command and open it up on the internet. I didn't clone the files originally, but downloaded the zip files. Could that have been my problem?

nelsonic commented 8 years ago

@Blak3Nick the zip should have worked. strange that it didn't but stoked that you're up & running. 🎉

soumenpal123 commented 8 years ago

Hi, I am new to it and am getting below error. Thanks in advance.

C:\Program Files\nodejs>heroku local web [WARN] No ENV file found [WARN] ENOENT: no such file or directory, open 'C:\Program Files\nodejs\Procfile ' [OKAY] package.json file found - trying 'npm start' 9:44:01 AM web.1 | > weathernodejs@1.0.0 start C:\Program Files\nodejs 9:44:01 AM web.1 | > node quickstart.js 9:44:01 AM web.1 | usage: node examples/quickstart.js ORIGDWXKSWGSLKSOT7RQIJLHR NWMELD2 9:44:01 AM web.1 | npm 9:44:01 AM web.1 | ERR! Windows_NT 6.2.9200 9:44:01 AM web.1 | npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Pro gram Files\nodejs\node_modules\npm\bin\npm-cli.js" "start" 9:44:01 AM web.1 | npm ERR! node v6.4.0 9:44:01 AM web.1 | npm ERR! npm v3.10.3 9:44:01 AM web.1 | npm ERR! code ELIFECYCLE 9:44:01 AM web.1 | npm ERR! 9:44:01 AM web.1 | weathernodejs@1.0.0 start: node quickstart.js 9:44:01 AM web.1 | npm ERR! Exit status 1 9:44:01 AM web.1 | npm ERR! 9:44:01 AM web.1 | npm ERR! Failed at the weathernodejs@1.0.0 start script 'nod e quickstart.js'. 9:44:01 AM web.1 | npm ERR! Make sure you have the latest version of node.js an d npm installed. 9:44:01 AM web.1 | npm ERR! If you do, this is most likely a problem with the w eathernodejs package, 9:44:01 AM web.1 | npm ERR! not with npm itself. 9:44:01 AM web.1 | npm ERR! Tell the author that this fails on your system: 9:44:01 AM web.1 | npm ERR! node quickstart.js 9:44:01 AM web.1 | npm ERR! You can get information on how to open an issue for this project with: 9:44:01 AM web.1 | npm ERR! npm bugs weathernodejs 9:44:01 AM web.1 | npm ERR! Or if that isn't available, you can get their info via: 9:44:01 AM web.1 | npm ERR! npm owner ls weathernodejs 9:44:01 AM web.1 | npm ERR! There is likely additional logging output above. 9:44:01 AM web.1 | npm ERR! Please include the following file with any support request: 9:44:01 AM web.1 | npm ERR! C:\Program Files\nodejs\npm-debug.log [DONE] Killing all processes with signal null 9:44:01 AM web.1 Exited with exit code 1

soumenpal123 commented 8 years ago

And here is the log file:

0 info it worked if it ends with ok 1 verbose cli [ 'C:\Program Files\nodejs\node.exe', 1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'start' ] 2 info using npm@3.10.3 3 info using node@v6.4.0 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle weathernodejs@1.0.0~prestart: weathernodejs@1.0.0 6 silly lifecycle weathernodejs@1.0.0~prestart: no script for prestart, continuing 7 info lifecycle weathernodejs@1.0.0~start: weathernodejs@1.0.0 8 verbose lifecycle weathernodejs@1.0.0~start: unsafe-perm in lifecycle true 9 verbose lifecycle weathernodejs@1.0.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Program Files\nodejs\node_modules.bin;C:\Program Files\nodejs;"C:\Program Files (x86)\Heroku\ruby-2.1.7\bin";C:\Program Files\Microsoft SDKs\Azure.NET SDK\v2.8\bin;C:\Program Files\Microsoft SDKs\Azure\emulator;C:\Program Files\Microsoft SDKs\Azure\emulator\devstore;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft Office Servers\15.0\Bin\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Heroku\bin;C:\Program Files (x86)\git\cmd;C:\Program Files (x86)\Git\cmd;C:\Program Files\nodejs\;C:\Users\ericame\AppData\Roaming\npm;C:\Program Files (x86)\Git\bin 10 verbose lifecycle weathernodejs@1.0.0~start: CWD: C:\Program Files\nodejs 11 silly lifecycle weathernodejs@1.0.0~start: Args: [ '/d /s /c', 'node quickstart.js' ] 12 silly lifecycle weathernodejs@1.0.0~start: Returned: code: 1 signal: null 13 info lifecycle weathernodejs@1.0.0~start: Failed to exec start script 14 verbose stack Error: weathernodejs@1.0.0 start: node quickstart.js 14 verbose stack Exit status 1 14 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:242:16) 14 verbose stack at emitTwo (events.js:106:13) 14 verbose stack at EventEmitter.emit (events.js:191:7) 14 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14) 14 verbose stack at emitTwo (events.js:106:13) 14 verbose stack at ChildProcess.emit (events.js:191:7) 14 verbose stack at maybeClose (internal/child_process.js:852:16) 14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5) 15 verbose pkgid weathernodejs@1.0.0 16 verbose cwd C:\Program Files\nodejs 17 error Windows_NT 6.2.9200 18 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start" 19 error node v6.4.0 20 error npm v3.10.3 21 error code ELIFECYCLE 22 error weathernodejs@1.0.0 start: node quickstart.js 22 error Exit status 1 23 error Failed at the weathernodejs@1.0.0 start script 'node quickstart.js'. 23 error Make sure you have the latest version of node.js and npm installed. 23 error If you do, this is most likely a problem with the weathernodejs package, 23 error not with npm itself. 23 error Tell the author that this fails on your system: 23 error node quickstart.js 23 error You can get information on how to open an issue for this project with: 23 error npm bugs weathernodejs 23 error Or if that isn't available, you can get their info via: 23 error npm owner ls weathernodejs 23 error There is likely additional logging output above. 24 verbose exit [ 1, true ]

nelsonic commented 8 years ago

@soumenpal123 can you please clarify what you are trying to do when you see this error, and please create a new issue: https://github.com/dwyl/learn-redux/issues/new so we can help you. thanks!

soumenpal123 commented 8 years ago

Thanks Nelson for your reply.

I am trying to create a BOT in wit.ai and try to deploy it into facebook messenger. I am successful to do that.

Now I need to call some external web service for that I am using nodejs and Heroku.

After creating the nodejs file when I try to deploy it locally after installing heroku toolbelt, I got the issue.

I am opening a new issue as per below mail.

Regards, Soumen

From: Nelson [mailto:notifications@github.com] Sent: Friday, August 19, 2016 12:53 PM To: dwyl/learn-redux learn-redux@noreply.github.com Cc: Soumen Pal soumen.p@hcl.com; Mention mention@noreply.github.com Subject: Re: [dwyl/learn-redux] npm ERR! Failed at the learn-redux@1.0.0 start script 'node devServer.js'. (#33)

@soumenpal123https://github.com/soumenpal123 can you please clarify what you are trying to do when you see this error, and please create a new issue: https://github.com/dwyl/learn-redux/issues/new so we can help you. thanks!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/dwyl/learn-redux/issues/33#issuecomment-241010165, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AUJNJM-i_E9a7KjTdruqfHwxuourL7THks5qhaccgaJpZM4IomKV.

::DISCLAIMER::

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.


ghost commented 4 years ago

i think this will help

npm install --save-dev node-sass

and then

npm install -g node-sass