wildfirechat/pc-chat

windows npm run dev报错 Cannot find module './build/Release/node_sleep.node'

PineSongCN opened this issue · 2 comments

npm run dev

> wildfireChat@0.3.2 dev D:\_webStation\test\pc-chat
> concurrently --kill-others "npm run hot-server" "node scripts/sleep.js & npm run start-hot"

[1] internal/modules/cjs/loader.js:984
[1]   throw err;
[1]   ^
[1]
Error: Cannot find module './build/Release/node_sleep.node'
[1] Require stack:
[1] - D:\_webStation\test\pc-chat\node_modules\sleep\index.js
[1] - D:\_webStation\test\pc-chat\scripts\sleep.js
[1]     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:981:15)
[1]     at Function.Module._load (internal/modules/cjs/loader.js:863:27)
[1]     at Module.require (internal/modules/cjs/loader.js:1043:19)
[1]     at require (internal/modules/cjs/helpers.js:77:18)
[1]     at Object.<anonymous> (D:\_webStation\test\pc-chat\node_modules\sleep\index.js:1:13)
[1]     at Module._compile (internal/modules/cjs/loader.js:1157:30)
[1]     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1177:10)
[1]     at Module.load (internal/modules/cjs/loader.js:1001:32)
[1]     at Function.Module._load (internal/modules/cjs/loader.js:900:14)
[1]     at Module.require (internal/modules/cjs/loader.js:1043:19) {
[1]   code: 'MODULE_NOT_FOUND',
[1]   requireStack: [
[1]     'D:\\_webStation\\test\\pc-chat\\node_modules\\sleep\\index.js',
[1]     'D:\\_webStation\\test\\pc-chat\\scripts\\sleep.js'
[1]   ]
[1] }
[0]
[0] > wildfireChat@0.3.2 hot-server D:\_webStation\test\pc-chat
[0] > cross-env NODE_ENV=development node -r babel-register scripts/dev.js
[0]
[1]
[1] > wildfireChat@0.3.2 start-hot D:\_webStation\test\pc-chat
[1] > cross-env HOT=1 NODE_ENV=development ./node_modules/.bin/electron --remote-debugging-port=9222 -r babel-register -r babel-polyfill ./main
[1]
[1] D:\_webStation\test\pc-chat\node_modules\electron\index.js:14
[1]     throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again')
[1]     ^
[1]
[1] Error: Electron failed to install correctly, please delete node_modules/electron and try installing again
[1]     at getElectronPath (D:\_webStation\test\pc-chat\node_modules\electron\index.js:14:11)
[1]     at Object.<anonymous> (D:\_webStation\test\pc-chat\node_modules\electron\index.js:18:18)
[1]     at Module._compile (internal/modules/cjs/loader.js:1157:30)
[1]     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1177:10)
[1]     at Module.load (internal/modules/cjs/loader.js:1001:32)
[1]     at Function.Module._load (internal/modules/cjs/loader.js:900:14)
[1]     at Module.require (internal/modules/cjs/loader.js:1043:19)
[1]     at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (D:\_webStation\test\pc-chat\node_modules\electron\cli.js:3:16)
[1]     at Module._compile (internal/modules/cjs/loader.js:1157:30)
[1] npm ERR! code ELIFECYCLE
[1] npm ERR! errno 1
[1] npm ERR! wildfireChat@0.3.2 start-hot: `cross-env HOT=1 NODE_ENV=development ./node_modules/.bin/electron --remote-debugging-port=9222 -r babel-register -r babel-polyfill ./main`
[1] npm ERR! Exit status 1
[1] npm ERR!
[1] npm ERR! Failed at the wildfireChat@0.3.2 start-hot script.
[1] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[1]
npm ERR! A complete log of this run can be found in:
[1] npm ERR!     D:\_install\software\nodejs\node_cache\_logs\2020-03-09T04_25_30_307Z-debug.log
[1] node scripts/sleep.js & npm run start-hot exited with code 1
--> Sending SIGTERM to other processes..
[0] npm run hot-server exited with code 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! wildfireChat@0.3.2 dev: `concurrently --kill-others "npm run hot-server" "node scripts/sleep.js & npm run start-hot"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the wildfireChat@0.3.2 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
imndx commented

你好,执行npm install 了吗?

你好,执行npm install 了吗?

谢谢,我删除nm,重新安装试试