alanshaw / david-www

:eyeglasses: David helps keep your Node.js project dependencies up to date.
https://david-dm.org
MIT License
730 stars 131 forks source link

npm run build, Cannot find module './routes' happen #371

Closed jay-genhot closed 6 years ago

jay-genhot commented 7 years ago

Hi team, when I try to build the project in the local, it reports Cannot find module './routes', I have no idea why this happen. My local env is Windows 7, node.js version is 5.9.0

could someone help me about this? thanks.

alanshaw commented 7 years ago

Do you have a stack trace you can paste here? Also please try upgrading to Node.js 6.x

jay-genhot commented 7 years ago

@alanshaw

C:\david-www>npm run build

david-www@22.1.0 build C:\david-www run-p build:**

david-www@22.1.0 build:js:server C:\david-www babel src --out-dir dist

david-www@22.1.0 build:js:client C:\david-www browserify -g envify src/ui/main.jsx -o public/bundle.js

david-www@22.1.0 build:css C:\david-www node-sass --include-path node_modules src/ui/main.scss public/bundle.css

Rendering Complete, saving .css file... Wrote CSS to C:\david-www\public\bundle.css src\config.js -> dist\config.js src\lib\auth.js -> dist\lib\auth.js Error: Cannot find module './routes' from 'C:\david-www\src\ui' at C:\david-www\node_modules\browser-resolve\node_modules\resolve\lib\async.js:55:21 at load (C:\david-www\node_modules\browser-resolve\node_modules\resolve\lib\async.js:69:43) at onex (C:\david-www\node_modules\browser-resolve\node_modules\resolve\lib\async.js:92:31) at C:\david-www\node_modules\browser-resolve\node_modules\resolve\lib\async.js:22:47 at FSReqWrap.oncomplete (fs.js:82:15) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! david-www@22.1.0 build:js:client: browserify -g envify src/ui/main.jsx -o public/bundle.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the david-www@22.1.0 build:js:client script 'browserify -g envify src/ui/main.jsx -o public/bundle.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 david-www package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! browserify -g envify src/ui/main.jsx -o public/bundle.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs david-www npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls david-www npm ERR! There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\AppData\Roaming\npm-cache_logs\2017-03-15T06_20_21_279Z-debug.log src\lib\brains.js -> dist\lib\brains.js src\lib\cache.js -> dist\lib\cache.js ERROR: "build:js:client" exited with 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" "build" npm ERR! node v5.9.0 npm ERR! npm v3.7.3 npm ERR! code ELIFECYCLE npm ERR! david-www@22.1.0 build: run-p build:** npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the david-www@22.1.0 build script 'run-p build:'. 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 david-www package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! run-p build: npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs david-www npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls david-www npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! C:\david-www\npm-debug.log

jay-genhot commented 7 years ago

and also, my teammates already install Node.js 6.x, but also come across this issue.

alanshaw commented 7 years ago

I've not tried building david on windows - did you resolve this? I'd welcome a PR to fix the issue if you figured it out.