phonegap installation fails due to package failure on https://github.com/ariya/esprima/tarball/master - node.js

I have an error when installing phonegap.
I have a problem with the https://github.com/ariya/esprima/tarball/master package, as it cannot be installed.
I have changed many different registries but all failed on the esprima module.
I even download the exact tarball manually from github and executed the following on the local filesystem:
npm install file_url
There is no sign of failure but "phonegap" command cannot still be used.
Please tell me how to install the failed module and finally get phonegap to work?
Thank you very much!

Related

realm-cli push failed after adding new node module

I added a node module (otp-generator) to my MongoDB Realm app using the realm-cli, and it worked as expected. I'm now trying to add another node module (twilio) to my MongoDB Realm app, but for some reason it now is giving the following error message when I try to push my new node modules archive that includes both otp-generator and twilio:
push failed: failed to install dependencies: failed to transpile node_modules/otp-generator/._index.js. "otp-generator" is likely not supported yet. unknown: Unexpected character '' (1:0)
This message is very strange because the otp-generator was working perfectly fine before I installed Twilio. What's going on here?
I was able to figure out a solution myself. I just uninstalled the packages, and then reinstalled twilio before otp-generator. Here are the specific steps I did:
npm uninstall twilio
npm uninstall otp-generator
npm install twilio
npm install otp-generator
tar -czf node_modules.tar.gz node_modules/
And then I pushed my changes again to Realm, and it worked!
I'm not sure if installing twilio before otp-generator is what specifically resolved the problem, but at the very least uninstalling and reinstalling installing all node modules from scratch fixed it.

Unable to resolve "./prebuilt.rn-f9cd27ba.js" from "node_modules\#firebase\firestore\dist\rn\index.js"

I was writing my code and I want some module to be installed so I installed all the required module but after that, I am getting this (Unable to resolve "./prebuilt.rn-f9cd27ba.js" from "node_modules#firebase\firestore\dist\rn\index.js") error again and again so I tried to uninstall all the module which I have installed and I also tried to reinstall, run npm install, and much more but this issue is not fixed pls help
Make sure you are running a modern version of Node.js (or whatever version your project is using (nvm can help with this).
Delete your node_modules directory and run npm install again.

Npm not installed?

I recently downloaded node.js from nodejs.org and installed it correctly on windows, from gitbash. I ran node -v, it gave me a version number, but when I ran npm -v, I get bunch of error message like these;
Internal/module/cjs/loader.js:330 Throw err;
Error: cannot find module 'C:\Program
Files\nodejs\node_modules\npm\node_modules\nom-registry-fetch\node_modules\fighy-pudding\index.js'.
Please verify that the package.json has a valid "main" entry
And other bunch of errors...
How do I fix these, please
Npm is distributed with Node.js- which means that when you download Node.js, you automatically get npm installed on your computer. If it's not working in your case then try again or you need to install npm separately.
For installing you can follow the blog:-
https://phoenixnap.com/kb/install-node-js-npm-on-windows
OR
You can download the same from:-
https://nodejs.org/en/download/
I hope it would help!

Firebase CLI Error: Failed to load gRPC binary module because it was not installed for the current system

I followed the instructions on the Firebase Website but I do the npm install, I login and then I do firebase serve and receive the following error.
Error: Failed to load gRPC binary module because it was not installed for the current system
Expected directory: node-v57-darwin-x64-unknown
Found: [node-v64-darwin-x64-unknown]
This problem can often be fixed by running "npm rebuild" on the current system
I have tried suggestions such as running npm rebuild, and deleting the node_modules as suggested here however the problem still persists. Any Ideas of what can be done to fix this. I've been using firebase for a while and only recently have I been encountering problems like this thank you for all of your help.
open a terminal / command prompt / CLI from your functions folder and issue the following command:
npm audit fix

Gulp installation: 'fs: re-evaluating native module sources is not supported' and node-sass errors

I have a new laptop and have had to reinstall gulp / npm in order to get my website files running properly locally. However I get the following error when I run the gulp command in Windows.
'fs: re-evaluating native module sources is not supported. If you
are using graceful-fs module please update it to a more recent
version'.
After looking into this error I have seen posts saying I simply need to run npm update -g npm. This command runs and flashes some info but then disappears before I can read the message. I assume it is already up to date seeing as though I have just installed it! I have tried running this command both globally and within the project folder.
If I run, npm info graceful-fs -v, my graceful-fs version is 3.10.8
So can anyone help? Im rubbish with this stuff :(
******UPDATE*******
I decided to uninstall graceful-fs and then run npm install.
After running gulp again I get,
Error the 'libsass' biding was not found in...
So I then ran npm rebuild node-sass and get load of node-sass errors.
Please help.
The issue seems to be that gulp 3.x (through vinyl-fs) uses the older version of graceful-fs. See this link for more info. I'm not sure but can you try updating gulp to 4.x ?

Resources