-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
Module not found: Error: Can't resolve 'node-pre-gyp' #909
Comments
Can help me!!! |
npm install node-pre-gyp |
after install this package node-pre-gyp WARNING in ./ WARNING in ./ WARNING in ./~/sqlite3/lib/sqlite3.js WARNING in ./~/node-pre-gyp/lib/pre-binding.js WARNING in ./~/node-pre-gyp/lib/util/versioning.js ERROR in ./ ERROR in ./ ERROR in ./ ERROR in ./ ERROR in ./ ERROR in ./ ERROR in ./ ERROR in ./ ERROR in ./ ERROR in ./ ERROR in ./ ERROR in ./ ERROR in ./ |
Do you still have this issue? This seems to be a Node configuration issue. Unless you can show how to reproduce this on a recent Node install, I propose that you close this issue |
I have this issue too. @RobertRajcool @wmertens any proposed solutions? |
Seeing how you're trying to build on windows, did you install the toolset?
npm install --global --production windows-build-tools
…On Fri, Jan 26, 2018, 9:25 PM Sana, ***@***.***> wrote:
I have this issue too. @RobertRajcool <https://github.com/robertrajcool>
@wmertens <https://github.com/wmertens> any proposed solutions?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#909 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADWlrjcNVjVFwFEQBxYOt3D7gtEEMAyks5tOjSvgaJpZM4QfI5u>
.
|
I saw this |
I had failed to build Luckily, I found an awesome module can work like a charm on both client or server side - sql.js created by the If you are still in troubles with integrating |
You could alias child_process to a module that fakes it all. I wonder how
you can use aws-sdk on the client side though, if it relies on
child_process.
…On Sat, Feb 3, 2018, 10:25 AM Mars Wong, ***@***.***> wrote:
I had failed to build sqlite3 for thousand times no matter how, for the
aws-sdk relys on child_process so every time you require('sqlite3') on
client side it could not be resolved.
Luckily, I found an awesome module can work like a charm on both client or
server side - sql.js <https://github.com/kripken/sql.js> created by the
emscripten's author.
If you are still in troubles with integrating electron and sqlite, you
should have a try :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#909 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADWlnXqs9dajIb8PLigwtAXGBtD5WJIks5tRCYLgaJpZM4QfI5u>
.
|
I have same problem. On Windows. Using electron. Exact error is:
const net = require('net')
const port = process.env.PORT ? process.env.PORT - 100 : 5000
process.env.ELECTRON_START_URL = `http://localhost:${port}`
const client = new net.Socket()
let startedElectron = false
const tryConnection = () =>
client.connect({ port: port }, () => {
client.end()
if (!startedElectron) {
console.log('starting electron')
startedElectron = true
const exec = require('child_process').exec
exec('yarn run electron')
}
})
tryConnection()
client.on('error', error => {
setTimeout(tryConnection, 1000)
}) The exact same project structure and configuration works flawlessly in another project created yesterday that does not use native modules i.e. sqlite3. |
@barbalex I'm getting the exact same error message when trying to use Sequelize (which depends on sqlite3) together with Electron, any clue how to solve this? |
@axelkennedal I ended up not using create-react-app but instead electron-react-boilerplate which solves the problem by using another package.json file - somehow... |
|
I'm getting this problem with fsevents on a Mac. Cannot find a solution. |
@mnmpeterson try deleting node_modules, package-lock.json and/or yarn.lock, and install again |
Did that, same problem. This is on an angularjs 1.6 project. On an angular 6.x project sfevents will download and compile what it needs from node-gyp but won’t do the same on my angularjs projects. |
For what its worth — I've run into the same problem. Deleting node_modules and lock files doesnt help, nor does adding node-pre-gyp globally. I think I too will use the other boilerplate |
If you are using electron, I used the package "electron-rebuild" to fix this. |
hi all, I am facing the same issue on Mac. Is anyone able to solve this problem?
Hey, Were you able to fix this issue after using boilerplate code and SQLite? curious to know :) |
This problem bothered me for three days, and now it's finally solved My solution:
important code If you solve this problem because of my solution, please share it with those who need help. And use this link。 :) |
This was happening to me because I was pointing to the wrong dependency in my case, it was bcrypt that was causing the issue error received when using : error fixed when using : |
Not sure why this was closed. Issue still exists with node-sqlite3 built from HEAD at April 24th 2020. |
Thanks @Jclyoung const bcrypt = require('bcryptjs') This was helpful to me |
for webpack users trying to bundle sqlite3; there may be a better way to do this, but you can override the new resolve: {
alias: {
[path.join(__dirname, 'node_modules/sqlite3/lib/sqlite3-binding.js')]: path.join(__dirname, 'path/to/local/sqlite3-binding.js')
}
} path/to/local/sqlite3-binding.js: var binding = require('bindings')('node_sqlite3');
module.exports = exports = binding; this approach requires the bindings package.
note: you will have to copy the |
July 2021, still having that issue with webpack + sqlite3 on linux |
Anyone who decides to try @Jclyoung's recommendation above, I would suggest considering whether you really want to include |
ERROR in sqlite3/lib/sqlite3.js
Module not found: Error: Can't resolve 'node-pre-gyp' in
The text was updated successfully, but these errors were encountered: