react-project icon indicating copy to clipboard operation
react-project copied to clipboard

npm start fails after creating a brand new application

Open amirmi opened this issue 9 years ago • 2 comments

needed to npm install history (Module not found: Error: Cannot resolve module 'warning' in /Users/Amir/development/a/the-best-app-ever/node_modules/history/lib)

and prompt (Error: Cannot find module 'node_modules/react-project/node_modules/prompt/node_modules/winston/lib/winston/transports/console'.)

in order to make it start... where is the generator package.json? I would have pushed a fix :)

amirmi avatar Apr 25 '16 20:04 amirmi

Any chance this is related to a bigger problem? I have a generator I built for mobx and ran into the exact same this. Generated apps just fine a few days ago, now suddenly the dev server won't serve anything up immediately after creating the project.

I wonder if one of our common dependencies (I suspect HtmlPlugin in mine) could be the culprit

cafreeman avatar Apr 26 '16 06:04 cafreeman

I tried an install and got this

[react-project] checking app dependencies
[react-project] NODE_ENV=development
/Users/reuven/Projects/bootstrap-custom/node_modules/react-project/lib/build.js:53
    if (err) throw err;
             ^

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.dirname (path.js:1324:5)
    at /Users/reuven/Projects/bootstrap-custom/node_modules/babel-core/lib/transformation/file/options/option-manager.js:374:36
    at /Users/reuven/Projects/bootstrap-custom/node_modules/babel-core/lib/transformation/file/options/option-manager.js:396:22
    at Array.map (native)
    at OptionManager.resolvePresets (/Users/reuven/Projects/bootstrap-custom/node_modules/babel-core/lib/transformation/file/options/option-manager.js:385:20)
    at OptionManager.mergePresets (/Users/reuven/Projects/bootstrap-custom/node_modules/babel-core/lib/transformation/file/options/option-manager.js:369:10)
    at OptionManager.mergeOptions (/Users/reuven/Projects/bootstrap-custom/node_modules/babel-core/lib/transformation/file/options/option-manager.js:328:14)
    at /Users/reuven/Projects/bootstrap-custom/node_modules/babel-core/lib/transformation/file/options/option-manager.js:370:14
    at /Users/reuven/Projects/bootstrap-custom/node_modules/babel-core/lib/transformation/file/options/option-manager.js:390:24

npm ERR! Darwin 16.6.0
npm ERR! argv "/usr/local/Cellar/node/7.4.0/bin/node" "/usr/local/bin/npm" "run" "react-project:start:dev"
npm ERR! node v7.10.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] react-project:start:dev: `eslint modules && react-project start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] react-project:start:dev script 'eslint modules && react-project start'.
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 bootstrap-custom 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 information on how to open an issue for this project with:
npm ERR!     npm bugs bootstrap-custom
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls bootstrap-custom
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/reuven/.npm/_logs/2017-05-23T14_03_40_068Z-debug.log

npm ERR! Darwin 16.6.0
npm ERR! argv "/usr/local/Cellar/node/7.4.0/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v7.10.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `if-env NODE_ENV=production && npm run react-project:start:prod || npm run react-project:start:dev`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script 'if-env NODE_ENV=production && npm run react-project:start:prod || npm run react-project:start:dev'.
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 bootstrap-custom 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 information on how to open an issue for this project with:
npm ERR!     npm bugs bootstrap-custom
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls bootstrap-custom
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/reuven/.npm/_logs/2017-05-23T14_03_40_087Z-debug.log

debug.log

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/7.4.0/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 silly lifecycle [email protected]~prestart: no script for prestart, continuing
7 info lifecycle [email protected]~start: [email protected]
8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/reuven/Projects/bootstrap-custom/node_modules/.bin:/Users/reuven/.fastlane/bin:/Users/reuven/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin
10 verbose lifecycle [email protected]~start: CWD: /Users/reuven/Projects/bootstrap-custom
11 silly lifecycle [email protected]~start: Args: [ '-c',
11 silly lifecycle   'if-env NODE_ENV=production && npm run react-project:start:prod || npm run react-project:start:dev' ]
12 silly lifecycle [email protected]~start: Returned: code: 1  signal: null
13 info lifecycle [email protected]~start: Failed to exec start script
14 verbose stack Error: [email protected] start: `if-env NODE_ENV=production && npm run react-project:start:prod || npm run react-project:start:dev`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:194:7)
14 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/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:194:7)
14 verbose stack     at maybeClose (internal/child_process.js:899:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid [email protected]
16 verbose cwd /Users/reuven/Projects/bootstrap-custom
17 error Darwin 16.6.0
18 error argv "/usr/local/Cellar/node/7.4.0/bin/node" "/usr/local/bin/npm" "start"
19 error node v7.10.0
20 error npm  v4.2.0
21 error code ELIFECYCLE
22 error errno 1
23 error [email protected] start: `if-env NODE_ENV=production && npm run react-project:start:prod || npm run react-project:start:dev`
23 error Exit status 1
24 error Failed at the [email protected] start script 'if-env NODE_ENV=production && npm run react-project:start:prod || npm run react-project:start:dev'.
24 error Make sure you have the latest version of node.js and npm installed.
24 error If you do, this is most likely a problem with the bootstrap-custom package,
24 error not with npm itself.
24 error Tell the author that this fails on your system:
24 error     if-env NODE_ENV=production && npm run react-project:start:prod || npm run react-project:start:dev
24 error You can get information on how to open an issue for this project with:
24 error     npm bugs bootstrap-custom
24 error Or if that isn't available, you can get their info via:
24 error     npm owner ls bootstrap-custom
24 error There is likely additional logging output above.
25 verbose exit [ 1, true ]

retzion avatar May 23 '17 14:05 retzion