wdjungst / react-project

State of the art web development with React.js.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Module error when running on Windows

tysonnero opened this issue · comments

I'm on Windows 7 and am getting a module error when starting node. Can anyone help me with this issue?

I followed the getting started instructions as so:
npm install -g create-react-project
create-react-project the-best-app-ever
cd the-best-app-ever
npm install
npm start

When executing npm start, I get the following error:

[react-project] wrote file .build\stats.json

c:\Projects\Samples\credit-cards.build\webpack:\react-project\prompt~\winston\lib\winston ^.$:35
return map[req] || (function() { throw new Error("Cannot find module '" + req + "'.") }());
^
Error: Cannot find module 'node_modules\react-project\node_modules\prompt\node_modules\winston\lib\winston\tran
sports\console'.
at c:\Projects\Samples\credit-cards.build\webpack:\react-project\prompt~\winston\lib\winston ^.
$:35
:34
at webpackContextResolve (c:\Projects\Samples\credit-cards.build\webpack:\react-project\prompt~\winst
on\lib\winston ^.$:35:89)
at webpackContext (c:\Projects\Samples\credit-cards.build\webpack:\react-project\prompt~\winston\lib\
winston ^.
$:32:1)
at Object.acc.(anonymous function).get [as Console](c:ProjectsSamplescredit-cards.buildwebpack:rea
ct-project
promptwinstonlibwinstontransports.js:23:1)
at new exports.Container (c:\Projects\Samples\credit-cards.build\webpack:
\react-project~\prompt~\winst
on\lib\winston\container.js:24:1)
at Object. (c:\Projects\Samples\credit-cards.build\webpack:\react-project\prompt~\winston\
lib\winston.js:51:1)
at Object. (c:\Projects\Samples\credit-cards.build\webpack:\react-project\prompt~\winston\
lib\winston.js:165:2)
at webpack_require (c:\Projects\Samples\credit-cards.build\webpack:\webpack\bootstrap 879236166c9361f4
58c8:19:1)
at Object. (c:\Projects\Samples\credit-cards.build\webpack:\react-project\prompt\lib\prompt
.js:14:1)
at Object.module.exports.module.deprecate (c:\Projects\Samples\credit-cards.build\webpack:~\react-project
~\prompt\lib\prompt.js:783:1)

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli
.js" "run" "react-project:start:dev"
npm ERR! node v4.2.4
npm ERR! npm v2.14.12
npm ERR! code ELIFECYCLE
npm ERR! credit-cards@1.0.0 react-project:start:dev: eslint modules && react-project start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the credit-cards@1.0.0 react-project:start:dev script 'eslint modules && react-project start
'.
npm ERR! This is most likely a problem with the credit-cards package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! eslint modules && react-project start
npm ERR! You can get their info via:
npm ERR! npm owner ls credit-cards
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! c:\Projects\Samples\credit-cards\npm-debug.log

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli
.js" "start"
npm ERR! node v4.2.4
npm ERR! npm v2.14.12
npm ERR! code ELIFECYCLE
npm ERR! credit-cards@1.0.0 start: if-env NODE_ENV=production && npm run react-project:start:prod || npm run r eact-project:start:dev
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the credit-cards@1.0.0 start script 'if-env NODE_ENV=production && npm run react-project:sta
rt:prod || npm run react-project:start:dev'.
npm ERR! This is most likely a problem with the credit-cards package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! if-env NODE_ENV=production && npm run react-project:start:prod || npm run react-project:start:dev
npm ERR! You can get their info via:
npm ERR! npm owner ls credit-cards
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! c:\Projects\Samples\credit-cards\npm-debug.log

Just upgraded to node 4.4.2 and npm 2.15.0 and still getting same error.

Upgraded to npm 3.8.6 and everything works now...