npm command in VM - linux

I have successfully installed the version of nodejs 14.18 in both in my host machine and VM. After some troubleshooting I manage to make javascripting work in my host machine however when I type javascripting in VM, it says command not found.
ERROR Message
anyone know why this message is displayed any help would be appreciated
I use vagrant as VM and it is required.

npm install -g javascripting attempts to install the module globally, which requires sudo elevation.
If you just want to install the module locally, run npm install javascripting without the -g parameter

Related

Getting error while installing npm modules on host system via vagrant

I am accessing ubuntu Virtual Machine from my host via vagrant and facing issues in npm module installations.
Scenario 1: When I try to do npm install directly on my ubuntu VM via vagrant I get error like :
npm ERR! ETXTBSY: text file is busy, rename '/home/vagrant/workspace/TruckLease-network/node_modules/bn.js/package.json.1931599852' -> '/home/vagrant/workspace/TruckLease-network/node_modules/bn.js/package.json'
Also gets multiple warnings for various modules giving same error - text file is busy.
I tried adding below to my vagrant file but did not work :
config.vm.provider "virtualbox" do |v| v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"] end
Scenario 2 : Then I tried to run 'npm install' on windows system directly , it worked with few warnings. Then I did run npm server to launch the application , that also run successfull. But when I hit the application with a get request I get Error :
Original error: Cannot find module '/home/vagrant/workspace/TruckLease-network/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc/grpc_node.node'
Please suggest where should I exactly run 'npm install' and let me know if there are any pre or post steps for running npm install.
Thanks,
Kalyani
If running npm install on a windows host and then running on Vagrant, you might try npm install --no-bin-links

Installing Angular CLI with npm install fails

I am new to AngularJS, just started an online course.
I am trying to install angular CLI on my computer at work running Windows 7.
I opened command line as administrator and running npm install -g #angular/cli. Installation starts and after a few minutes I get an error:
I see the notification "operation not permitted", but I am the administrator of the computer and the command line I run as administrator.
What am I doing wrong?
The same installation I did on my laptop at home and it was successful.
I am checking with our IT support about other possible causes and will appreciate any help.
This is not a duplicate of Fail to install npm package “npm ERR! errno -4048” or npm install -g angular-cli fails.
Ignoring the error and running gn -v I get the following:
Is this correct? Was Angular CLI installed?
These issues are because of the company proxy settings.
Check with your admin to get the proxy for http or https.
It will be something like this:
http_proxy = http://http.myproxy.com:8000
https_proxy = http://http.myproxy.com:8000
Replace myproxy with the name of company proxy.
Then go to the command prompt and run the following command to set the proxy. Later you can run any command like npm install -g #angular/cli to run. It will work
npm config set proxy http://http.myproxy.com:8000
npm config set https-proxy http://http.myproxy.com:8000
That fsevents library has peculiarities on Windows. So I suggest you ignore the error message and run ng -v from the command prompt to confirm you got the Angular CLI libraries installed.
You need to run the npm commands on node.js command prompt but not on windows command line.
Workaround: install git bash on windows.
As the error message suggest, you don't have some permissions to execute your command.
Depending on your system, you should run the command as an administrator.
Also, don't mix AngularJS (the first Angular framework) and Angular (also known as Angular 2, 4 and 5 now) . They are radically different in their syntax and uses.
Run below command and try installing angular cli again.
npm cache clean -f
This worked for me manytimes.

"npm install express-react-views" result in access error

I want to install express-react-views in Ubuntu 14.04 locally(not globally) but the installation results in an access error--it is trying to access global npm folder.
Anything I have done wrongly or express-react-views requires sudo privilege?

installing nodejs module doesnt give me the command

I am trying to run pixel-ping and running into trouble. I followed these instructions:
http://documentcloud.github.io/pixel-ping/
and it mentions that Installing Pixel Ping gives you the pixel-ping command. but when I type pixel-ping path/to/config.json it returns -bash: pixel-ping: command not found
I am not sure why it would say that any ideas would be greatly appreciated. I have both nodejs and npm installed I have other modules working perfectly. Am I doing something wrong ?
curl npmjs.org/install.sh | sudo sh
Install Pixel Ping via NPM:
sudo npm install -g pixel-ping
Restart shell
Also ensure
~/npm/bin is in the Path

Error while installing node inspector on window 7 machine

I ran following command to install node inspector.
npm install -g node-inspector
But npm gave some error. Please see below image for more information. After this I ran node-inspector command which is not recognized by the system.
This looks like npm cannot download tarballs from the public registry.
The error message ENOTFOUND means the npm was not able to resolve the IP address of registry.npmjs.org. Check your network connection and DNS configuration and make sure you can access registry.npmjs.org (e.g. run ping registry.npmjs.org).

Resources