Suddenly I have started seeing below error while running a Node.js app using node-rdkafka. It was working before, not sure what triggered this error.
Error: Could not locate the bindings file. Tried
-> /home/...../node-librdkafka.node ...
I tried npm install, npm rebuild, all of them work without giving any issue, just that the bindings do not get created.
this is on debian-jessie guest in Virtual box running on Windows as host.
Thanks!
npm install node-rdkafka resolved this issue.
Related
I have installed the latets version of Node.js for Windows. Whatever command I use I always get the same exception, i.e. when I type "npm -v" get this error message:
Cannot find module 'es6-promisify'
How to install "es6-promisify" when NPM is missing "es6-promisify" in the first place?
BTW, during the installation of Node.js a view dependencies try to access protected foldes inside external hard drives for no reason and the last error that stuck forever was the installation of Microsoft Visual Studio Code. It seems to me that those tools cannot be installed without giving 100% access to every folder on every partition you have. This seems wrong to me...
Step 1: Uninstall the NodeJs app from the system
Step 2: Goto the programFiles/nodejs -> delete node_modules folder
Step 3: Reinstall NodeJs app
By following these steps you can fix the issue.
I found out a solution to this issue. I had to unplug all external drives, restart Windows, delete the folder "node_modules" manually and finally I started the Node.js msi to repair the installtion (copies files to node_modules again). After theses steps NPM is working again.
Remember: Reparing the installation without deleting the node_modules folder manually was not sufficient.
When i do a npm run build I am getting the following error.
./pages/_app.js
Module not found: Can't resolve '../components/Nav/Nav' in '/home/webuser/node_site/document/pages'
The components and Nav folder are in the correct location. Also the Nav.js file is also there. I have also tried ../components/Nav/Nav.js still giving module not found.
Node is version 12.16.2
npm version 6.14.4
Ok well this is embarrassing. I had caps incorrectly mac doesn't seem to however linux does. the folder structure is components/nav/Nav the code is ../components/Nav/Nav it compiled just fine on the mac. Once I changed the code to ../components/nav/Nav everything worked.
I updated Brew then updated Node from 10.12.0 -> 13.8.0
Now, I get the following error when trying to deploy a Google Cloud Function
firebase deploy --only functions:createJWT
i functions: preparing functions directory for
uploading...
Error: Error parsing triggers: Failed to load gRPC binary module
because it was not installed for the current system Expected
directory: node-v79-darwin-x64-unknown Found:
[node-v64-darwin-x64-unknown] This problem can often be fixed by
running "npm rebuild" on the current system Original error: Cannot
find module
'/Users/.../cloud-functions/functions/node_modules/grpc/src/node/extension_binary/node-v79-darwin-x64-unknown/grpc_node.node'
Require stack:
- /Users/.../cloud-functions/functions/node_modules/grpc/src/grpc_extension.js
- /Users/.../cloud-functions/functions/node_modules/grpc/src/client_interceptors.js
- /Users/.../cloud-functions/functions/node_modules/grpc/src/client.js
- /Users/.../cloud-functions/functions/node_modules/grpc/index.js
- /Users/.../cloud-functions/functions/node_modules/#google-cloud/common-grpc/src/service.js
- /Users/.../cloud-functions/functions/node_modules/#google-cloud/common-grpc/src/operation.js
- /Users/.../cloud-functions/functions/node_modules/#google-cloud/common-grpc/src/index.js
- /Users/.../cloud-functions/functions/node_modules/#google-cloud/logging/src/index.js
- /Users/.../cloud-functions/functions/index.js
- /usr/local/lib/node_modules/firebase-tools/lib/triggerParser.js
Try running "npm install" in your functions directory before
deploying.
Tried npm rebuild and npm install in my functions directory and nothing works
Furthermore...could this issue be due to the fact that GCF Node runtime enviroment is Node10 and I have installed Node13 on my machine? - according to these docs:
https://cloud.google.com/functions/docs/concepts/nodejs-10-runtime
I am struggling to revert back to Node10, have tried by running brew install node#10 and get this:
Then tried running the following command as per output above to symlink it to /usr/local but still no luck
echo 'export PATH="/usr/local/opt/node#10/bin:$PATH"' >> ~/.bash_profile
Searching around about this error, indeed, this seems that the problem is related to your system waiting for a version and founding another one - as per this part of the error.
Error: Error parsing triggers: Failed to load gRPC binary module because it was not installed for the current system Expected directory: node-v79-darwin-x64-unknown Found: [node-v64-darwin-x64-unknown]
There are some options that you can give it a try, besides trying the npm rebuild. Another option might be updating the package.json - as per this case solved here - that would return your npm version to an old one.
Besides that, on this question in the Community, there are a few solutions that helped other users, that I would recommend you to take a look at it: NodeJs Error - Failed to load gRPC binary module because it was not installed for the current system Expected directory?
Let me know if the information helped you!
Trying to deploy to an unsupported Google Function execution environment won't work. According to the google docs the current supported environments are Node8 and Node10(beta), re-installing Node10 worked for me.
I'm using truffle with a Node.js project, and when I attempt to migrate the project, I get the following error:
Windows Script Host
However, when I use the suggested fix, which is to rename the truffle.js file to something other than truffle.js (i.e. truffle-config.js), then I get a different error:
Could not find suitable configuration file.
When I rename the configuration file back to "truffle.js", then I get the first error all over again.
The solutions I've tried have included using Windows Powershell to run the program and running the command npm install --force -g truffle, neither of which have worked. I've looked into the recommended solution (https://github.com/trufflesuite/truffle/issues/150), and none of the proposed solutions have worked so far.
I have an application that I am running for the first time in a new computer. I keep getting the following error when starting the app
Error: Cannot find module './src/async'
I checked the application directory and I see the module there. I have tried re-installing the module and doing npm install and still no luck.