-
-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for nw.js #65
Comments
Still no decision? |
I don't really plan on investigating the installation issues related to Electron, nw.js, etc. As far as I'm concerned |
I can understand that you don‘t have the time to do that. Yet I would recommend to leave the case open if you change your mind in the fufure. |
Just to be clear, nwjs isn't quite like electron in this regard. Modules need to be built from source with nw-gyp. I've tried replacing 'sqlite3' with 'better-sqlite3' in the commands stated on the sqlite3 documentation but had no luck. If I get it working, I'll post back. |
For me it compiles without any error "nw-gyp rebuild --target=0.29.3 --arch=x64". but running the exemple code causes nw.js to crash with no logs or anything. |
sames goes for me |
I managed to install
According to Use Native Node Modules - NW.js Documentation the steps 1-3 should have been enough but, for some reason, step 4 was also needed in my case. |
NW.js is like electron but has some advantages like code protection etc.
However better-sqlite3 ist not running with nw.js. Here the error
174 verbose lifecycle better-sqlite3@4.0.2
install: unsafe-perm in lifecycle trueinstall: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/timebro/timeBro/git/mac/front/timeBro.app/Contents/Resources/app.nw/node_modules/better-sqlite3/node_modules/.bin:/Users/timebro/timeBro/git/mac/front/timeBro.app/Contents/Resources/app.nw/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin175 verbose lifecycle better-sqlite3@4.0.2
176 verbose lifecycle better-sqlite3@4.0.2
install: CWD: /Users/timebro/timeBro/git/mac/front/timeBro.app/Contents/Resources/app.nw/node_modules/better-sqlite3install: Args: [ '-c', 'node deps/install' ]177 silly lifecycle better-sqlite3@4.0.2
178 silly lifecycle better-sqlite3@4.0.2
install: Returned: code: 1 signal: nullinstall: Failed to exec install script179 info lifecycle better-sqlite3@4.0.2
180 verbose unlock done using /Users/timebro/.npm/_locks/staging-ab38ca7a6a6822fb.lock for /Users/timebro/timeBro/git/mac/front/timeBro.app/Contents/Resources/app.nw/node_modules/.staging
181 warn timeBro@1.2.2 No description
182 warn timeBro@1.2.2 No repository field.
183 warn timeBro@1.2.2 license should be a valid SPDX license expression
184 verbose stack Error: better-sqlite3@4.0.2 install:
node deps/install
184 verbose stack Exit status 1
184 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:280:16)
184 verbose stack at emitTwo (events.js:125:13)
184 verbose stack at EventEmitter.emit (events.js:213:7)
184 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
184 verbose stack at emitTwo (events.js:125:13)
184 verbose stack at ChildProcess.emit (events.js:213:7)
184 verbose stack at maybeClose (internal/child_process.js:887:16)
184 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
185 verbose pkgid better-sqlite3@4.0.2
186 verbose cwd /Users/timebro/timeBro/git/mac/front/timeBro.app/Contents/Resources/app.nw
187 verbose Darwin 16.6.0
188 verbose argv "/usr/local/Cellar/node/8.0.0_1/bin/node" "/usr/local/bin/npm" "install" "better-sqlite3" "--save"
189 verbose node v8.0.0
190 verbose npm v5.4.0
191 error code ELIFECYCLE
192 error errno 1
193 error better-sqlite3@4.0.2 install:
node deps/install
193 error Exit status 1
194 error Failed at the better-sqlite3@4.0.2 install script.
194 error This is probably not a problem with npm. There is likely additional logging output above.
195 verbose exit [ 1, true ]
The text was updated successfully, but these errors were encountered: