Closed AlexKotov closed 7 years ago
Looks like that the native modules need rebuilding, see http://docs.nwjs.io/en/latest/For%20Users/Advanced/Use%20Native%20Node%20Modules/
Oh, thanx. It works. But i've got new issue:
Uncaught Error: Cannot find module './build/Release/node_sleep.node'
at Function.Module._resolveFilename (module.js:494:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:522:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\Users\someUser\Desktop\dev\nwjs\projects\my-betshop\cardreader\node_modules\sleep\index.js:2:18)
at Module._compile (module.js:595:32)
at Object.Module._extensions..js (module.js:610:10)
at Module.load (module.js:512:32)
at tryModuleLoad (module.js:471:12)
at Function.Module._load (module.js:463:3)
Solved " Uncaught Error: Cannot find module './build/Release/node_sleep.node' ":
rm -rf node_modules npm cache clean npm install
Tried the above: ash-4.3# rm -rf node_modules/ ash-4.3# npm cache clean --force npm WARN using --force I sure hope you know what you are doing. ash-4.3# npm install gyp WARN EACCES user "root" does not have permission to access the dev dir "/volume1/git/node-ffmpeg-mpegts-proxy/node_modules/sleep/.node-gyp/8.9.4" gyp WARN EACCES attempting to reinstall using temporary dev dir "/volume1/git/node-ffmpeg-mpegts-proxy/node_modules/sleep/.node-gyp" ^C
Tried the above with --unsafe-perm option to npm install: ash-4.3# rm -rf node_modules/ ash-4.3# npm cache clean --force npm WARN using --force I sure hope you know what you are doing. ash-4.3# npm install --unsafe-perm
sleep@4.0.0 install /volume1/git/node-ffmpeg-mpegts-proxy/node_modules/sleep node-gyp rebuild
gyp ERR! build error gyp ERR! stack Error: not found: make gyp ERR! stack at getNotFoundError (/usr/local/lib/node_modules/npm/node_modules/which/which.js:13:12) gyp ERR! stack at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:19) gyp ERR! stack at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29) gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16 gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:42:5 gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/mode.js:8:5 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21) gyp ERR! System Linux 4.4.59+ gyp ERR! command "/volume1/@appstore/Node.js_v8/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /volume1/git/node-ffmpeg-mpegts-proxy/node_modules/sleep gyp ERR! node -v v8.9.4 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sleep@4.0.0 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sleep@4.0.0 install 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! /root/.npm/_logs/2018-09-13T08_56_41_795Z-debug.log
/root/.npm/_logs/2018-09-13T08_56_41_795Z-debug.log:
2411 silly install sleep@4.0.0
2412 info lifecycle sleep@4.0.0~install: sleep@4.0.0
2413 verbose lifecycle sleep@4.0.0~install: unsafe-perm in lifecycle true
2414 verbose lifecycle sleep@4.0.0~install: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/volume1/git/node-ffmpeg-mpegts-proxy/node_modules/sleep/node_modules/.bin:/volume1/git/node-ffmpeg-mpegts-proxy/node_modules/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin:/var/services/homes/Enoch/bin:.:/root/bin:.
2415 verbose lifecycle sleep@4.0.0~install: CWD: /volume1/git/node-ffmpeg-mpegts-proxy/node_modules/sleep
2416 silly lifecycle sleep@4.0.0~install: Args: [ '-c', 'node-gyp rebuild' ]
2417 silly lifecycle sleep@4.0.0~install: Returned: code: 1 signal: null
2418 info lifecycle sleep@4.0.0~install: Failed to exec install script
2419 verbose unlock done using /root/.npm/_locks/staging-88f7d7341732df16.lock for /volume1/git/node-ffmpeg-mpegts-proxy/node_modules/.staging
2420 silly saveTree node-ffmpeg-mpegts-proxy@0.8.0
2420 silly saveTree ├─┬ chokidar@1.7.0
...
2420 silly saveTree ├── sleep@4.0.0
2420 silly saveTree ├─┬ winston@0.8.3
2420 silly saveTree │ ├── async@0.2.10
2420 silly saveTree │ ├── colors@0.6.2
2420 silly saveTree │ ├── cycle@1.0.3
2420 silly saveTree │ ├── eyes@0.1.8
2420 silly saveTree │ ├── isstream@0.1.2
2420 silly saveTree │ ├── pkginfo@0.3.1
2420 silly saveTree │ └── stack-trace@0.0.10
2420 silly saveTree └── yargs@1.3.3
2421 warn optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
2422 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2423 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
2423 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
2423 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: linux
2423 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
2424 verbose stack Error: sleep@4.0.0 install: node-gyp rebuild
2424 verbose stack Exit status 1
2424 verbose stack at EventEmitter.node-gyp rebuild
2433 error Exit status 1
2434 error Failed at the sleep@4.0.0 install script.
2434 error This is probably not a problem with npm. There is likely additional logging output above.
2435 verbose exit [ 1, true ]
I'm using next technologies in my app: nodejs v7.2.1 nwjs v0.19.0 node in nwjs v7.2.0 Windows 10 Pro x64 npm ffi npm ref npm ref-array npm sleep MasterRD.dll
Code, that fails: