react-in-action/letters-social

branch 5-6 npm run dev fails (nvm 8.12.0 & db:seed)

Closed this issue · 3 comments

npm run dev

letters-social@1.0.0 dev /home/cajadeleones/reactbook/letters-social
NODE_ENV=development npm-run-all -p api client:dev server:dev styles:w

letters-social@1.0.0 server:dev /home/cajadeleones/reactbook/letters-social
nodemon --config nodemon.json index.js

letters-social@1.0.0 api /home/cajadeleones/reactbook/letters-social
nodemon -x node -r @std/esm ./db/run.js

letters-social@1.0.0 client:dev /home/cajadeleones/reactbook/letters-social
webpack-dev-server --config ./build/webpack.config.js

letters-social@1.0.0 styles:w /home/cajadeleones/reactbook/letters-social
npm run styles && node-sass src/styles/styles.scss -o static/ -w src/styles --watch --recursive

module.js:550
throw err;
^

Error: Cannot find module 'debug'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object. (/home/cajadeleones/reactbook/letters-social/node_modules/chokidar/node_modules/expand-brackets/index.js:14:13)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
module.js:550
throw err;
^

Error: Cannot find module 'debug'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object. (/home/cajadeleones/reactbook/letters-social/node_modules/chokidar/node_modules/expand-brackets/index.js:14:13)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! letters-social@1.0.0 api: nodemon -x node -r @std/esm ./db/run.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the letters-social@1.0.0 api script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! letters-social@1.0.0 server:dev: nodemon --config nodemon.json index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the letters-social@1.0.0 server:dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/cajadeleones/.npm/_logs/2018-09-12T06_42_30_654Z-debug.log

npm ERR! A complete log of this run can be found in:
npm ERR! /home/cajadeleones/.npm/_logs/2018-09-12T06_42_30_676Z-debug.log
ERROR: "api" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! letters-social@1.0.0 dev: NODE_ENV=development npm-run-all -p api client:dev server:dev styles:w
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the letters-social@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/cajadeleones/.npm/_logs/2018-09-12T06_42_30_992Z-debug.log

tried with npm start

npm start

letters-social@1.0.0 start /home/cajadeleones/reactbook/letters-social
NODE_ENV=production pm2 start ./index.js --no-daemon

                    -------------

/\\\\\\_/\\/\\/\\\\_
_/\/////////\_/\\\
/\\\/\///////\_
/\_
/\_/\//\_/\//\_/////\_
_/\\\\\\/
/\\///\/\/
/\_
/\/
/\/////////
/\_
///\/
/\_/\//_____
/\_
/\_////\_____/\//_____
/\_/\_/\_/\/__________
/\_/\_/\_/\\\\\\\_
_////////////////////////

                      Community Edition

        Production Process Manager for Node.js applications
                 with a built-in Load Balancer.


            Start and Daemonize any application:
            $ pm2 start app.js

            Load Balance 4 instances of api.js:
            $ pm2 start api.js -i 4

            Monitor in production:
            $ pm2 monitor

            Make pm2 auto-boot at server restart:
            $ pm2 startup

            To go further checkout:
            http://pm2.io/


                    -------------

pm2 launched in no-daemon mode (you can add DEBUG="*" env variable to get more messages)
module.js:550
throw err;
^

Error: Cannot find module 'debug'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (/home/cajadeleones/reactbook/letters-social/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at Object. (/home/cajadeleones/reactbook/letters-social/node_modules/chokidar/node_modules/expand-brackets/index.js:14:13)
at Module._compile (/home/cajadeleones/reactbook/letters-social/node_modules/v8-compile-cache/v8-compile-cache.js:178:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! letters-social@1.0.0 start: NODE_ENV=production pm2 start ./index.js --no-daemon
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the letters-social@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/cajadeleones/.npm/_logs/2018-09-12T06_49_06_761Z-debug.log

@elfelround hmm I'll take a look; looks like missing module, maybe it slipped through somehow.

@elfelround closing this since I applied a few patches and can't repro locally myself. Let me know if you still see the error after pulling 👍