Running on a raspberry pi 3, getting this error
Tried using LZZ_COMPAT=1, no success
info using [email protected]
info using [email protected]
Log:
Error: Cannot find module '../build/better_sqlite3.node'
[1] at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15)
[1] at Function.Module._load (internal/modules/cjs/loader.js:529:25)
[1] at Module.require (internal/modules/cjs/loader.js:659:17)
[1] at require (internal/modules/cjs/helpers.js:22:18)
[1] at Object.<anonymous> (/home/pi/instapy-dashboard/node_modules/better-sqlite3/lib/database.js:5:21)
[1] at Module._compile (internal/modules/cjs/loader.js:723:30)
[1] at Object.Module._extensions..js (internal/modules/cjs/loader.js:734:10)
[1] at Module.load (internal/modules/cjs/loader.js:620:32)
[1] at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
[1] at Function.Module._load (internal/modules/cjs/loader.js:552:3)
[1] npm ERR! code ELIFECYCLE
[1] npm ERR! errno 1
Any tips? Thanks
im having that too. tried all the troubleshooting stuff and whatnot. No luck
I was able to get it running by doing node-gyp rebuild in both the integer and better-sqlite3 folders under node_modules. Hopefully this works for you!
(Took a while for me to find out exactly was messing up, but I think that it’s just node-gyp being weird)
@sleepadru tried the node-gyp rebuild on the folders and the same error happened :/
i guess that is something related to node
what is your node version?
thanks
Node: v8.6.0
NPM: v5.3.0
node-gyp: v3.8.0
You could also try copying the things from better-sqlite3/build/Release folder down to the build folder immediately below it, it seems that it’s looking for the files in the Release folder that would normally get copied to the build folder but aren’t
I never used the LZZ_COMPAT =1 flag though, so I don’t know if that has anything to do with it
The LZZ_COMPAT flag was used in previous versions of better-sqlite3, but is no longer in use.
I hate the same problem...
internal/modules/cjs/loader.js:582
throw err;
^
Error: Cannot find module '../build/better_sqlite3.node'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
at Function.Module._load (internal/modules/cjs/loader.js:506:25)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (C:\Users\jotar\OneDrive\Desktop\GitHub\Kaiso\node_modules\better-sqlite3\lib\database.js:5:21)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
Having the same problem...
Tried almost everything, nothing works.
Better_sqlite3 worked before i updated my environment, but now using the latest versions, i'm stuck
My environment:
Node: v11.4.0
NPM: v6.4.1
node-gyp: v3.8.0
Copying file from better-sqlite3/build/Release solved for me. Dont know why
In my case, there is no Release folder, only deps
better-sqlite3 is built by node-gyp, which is the standard way of building any native addon for Node.js.
After the binaries are built, we utilize a node-gyp command called copies:
"copies": [{
"files": ["<(PRODUCT_DIR)/better_sqlite3.node"],
"destination": "build",
}],
Since this command is provided by node-gyp, I assume that it works on every platform. However, it seems like the issue described in this thread is likely related to this copies command not working as expected.
If the command is indeed supported on every platform, it's possible that the copy is failing due to incorrect permissions or something similar.
npm uninstall better-sqlite3-helper -g
npm uninstall better-sqlite3-helper --save
npm i better-sqlite3-helper --save
it worked
Does anyone actually know how to fix this dumb issue? No suggestion suggested from above actually work.
Same error... i have tried to uninstall the module but nothing happens...
same error, nothing worked. Give me help plsss
I guess that the only way to solve this issue is to downgrade the node
I guess that the only way to solve this issue is to downgrade the node
it's working ?
fixed. thanks anyways
Miky
Il Sab 11 Mag 2019, 22:19 hug0 notifications@github.com ha scritto:
I guess that the only way to solve this issue is to downgrade the node
it's working ?—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/JoshuaWise/better-sqlite3/issues/214#issuecomment-491540888,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKWSZ7NM65GWRQE2AY6DAR3PU4S5DANCNFSM4GMHJY3A
.
Hi there,
debugging this leads to the database.js file, which has the line:
const CPPDatabase = require('../build/better_sqlite3.node').Database;
but the build directory is not existing. Can you debug this or does anyone have help here?
Regards
Simply running npm i better-sqlite3 fixed my problem ¯_(ツ)_/¯
(ik its an old thread but still)
nercoposting probably but im pretty sure it had to do with the fact that you had two dots instead of one...
@MacindowsRegistry require() paths are relative from the file they are used, so two dots are correct. The file is being loaded from /lib/database.js
i solved this on my side, i you find "make: Nothing to be done for `all'." during your installation, then you have the same problem with me.
it's a bug on old GNU make (3.80), try to use "make -v" to find your make version . i replace it with a newer GNU make (>=3.81) . you can set it in your PATH
$ make -v
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
我也出现类似的错误。还在寻找解决办法 node 12.1.0 npm 6.9.0|

Hey, it's probably late, but if any of you are having this problem while using Glitch, you may run the following command in the console:
enable-pnpm
Most helpful comment
Hey, it's probably late, but if any of you are having this problem while using Glitch, you may run the following command in the console:
enable-pnpm