I'm developing Node.js app.
I save all of the files on the Google Drive File Stream and it works very well.
But when try to install some package with NPM in terminal, it makes error.
Maybe terminal on VS Code cannot make new directory in Google DFS.
npm WARN tar TAR_ENTRY_ERROR UNKNOWN: unknown error, write
npm WARN tar TAR_ENTRY_ERROR UNKNOWN: unknown error, write
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://github.com/npm/cli/issues>
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\username\AppData\Local\npm-cache\_logs\2021-01-05T00_13_21_425Z-debug.log
I can do it in my local drive folder and copy it again to DFS but it's little annoying.
Is there any way to solve it?
I am using Google drive Desktop App. There only I am saving all my codes.
When I was installing a python-shell npm package. I found, empty files inside -> The path node_modules/python-shell
So I copied, entire folder of my code and saved it in Desktop (I mean you can save the files in Local)
Then I installed python-shell package correctly
Related
I have downloaded Nodejs in my Linux VM from nodejs.org, I want to install it from terminal. VM have already installed node v0.12.18 manually by someone else, I don't know how to do that. As I am installing nodejs offline, I should not depend on that whether or not npm installed.
I have tried [location]~ npm install node-v15.6.0-linux-x64.tar.gz
Getting below error
[host#machinename ~]$ sudo npm install node-v15.6.0-linux-x64.tar.gz
npm WARN excluding symbolic link bin/npm -> ../lib/node_modules/npm/bin/npm-cli. js
npm WARN excluding symbolic link bin/npx -> ../lib/node_modules/npm/bin/npx-cli. js
npm ERR! addLocal Could not install /home/usermachinename/node-v15.6.0-linux-x64.tar.g z
npm ERR! Linux 3.10.0-1062.9.1.el7.x86_64
npm ERR! argv "/usr/local/lib/nodejs/node-v0.12.18-linux-x64/bin/node" "/usr/loc al/lib/nodejs/node-v0.12.18-linux-x64/bin/npm" "install" "node-v15.6.0-linux-x64 .tar.gz"
npm ERR! node v0.12.18
npm ERR! npm v2.15.11
npm ERR! path /tmp/npm-1637-a9cb4311/unpack-5a7f411732fb/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! enoent ENOENT, open '/tmp/npm-1637-a9cb4311/unpack-5a7f411732fb/package .json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /home/usermachinename/npm-debug.log
How can I fix this?
You can't install the file using npm install, but since you already have the compressed file for node, my answer will hopefully help you achieve your goal.
First of all you will have to extract the tar.gz file you have node-v15.6.0-linux-x64.tar.gz, to do so just navigate to the folder where the file placed in then do the below command.
tar xf node-v15.6.0-linux-x64.tar.gz
Since you're using Linux the below command will add the new extracted node to your path.
nano ~/.profile
Add the following lines to the end:
# NodeJS
export NODEJS_HOME=/{path_to_the_extracted_folder}/node-v15.6.0-linux-x64/bin
export PATH=$NODEJS_HOME:$PATH
Please make sure you change {path_to_the_extracted_folder} to the path where you extracted the compressed file in the previous step.
Finally you can click CTRL+C to exit nano, type y then click enter.
To refresh the profile file enter the below code
. ~/.profile
Finally
To make sure everything is working fine check the nodeJs version by entering this command node -v it has to print v15.6.0.
You will not have to worry about the previously installed node version since above steps will change the nodeJs path.
I'm trying out a Resume Creator from Github. It calls for npm install, but when i run it, it outputs multiple error messages such as: npm ERR! Verification failed while extracting material-design-icons#3.0.1: and (this shows up hundreds of times, with different files) npm WARN tar ENOENT: no such file or directory, open 'D:\best-resume-ever\node_modules.staging\rxjs-7f4abf76_esm5\internal\operators\findIndex.js.map'
I have tried reinstalling Node, clearing cache, I'm aware that I'm behind a proxy, but I've worked around it. I've tried cloning the git onto another drive, still no change. Other project work fine.
I expected a finished npm install with no errors, acutal output was a long list of "npm WARN tar ENOENT: no such file or directory, open "path"
Do you have git installed on your machine? If you don't, you need to install it from here: https://git-scm.com/downloads.
Check your error log again. If you have this error near the bottom of your log, you definitely need to install git.
npm ERR! syscall spawn git
Noob here, I am trying to use bash terminal to install npm modules and use as a Remote-WSL terminal.
Some background info, I am using VSCode as my code editor. I am trying to make a javaScript app using node.js. I set up Ubuntu terminal on Windows 10.
After updating npm to the latest version I started getting these errors when trying to install express, using npm install express --save
npm WARN tar EPERM: operation not permitted, futime
npm WARN tar EPERM: operation not permitted, futime
npm WARN tar EPERM: operation not permitted, futime
// etc, etc, etc 500x...
npm WARN bashdemo#1.0.0 No description
npm WARN bashdemo#1.0.0 No repository field.
npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path /mnt/d/Program Files/Workspace/bashDemo/node_modules/bytes
npm ERR! dest /mnt/d/Program Files/Workspace/bashDemo/node_modules/.bytes.DELETE
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, rename '/mnt/d/Program Files/Workspace/bashDemo/node_modules/bytes' -> '/mnt/d/Program Files/Workspace/bashDemo/node_modules/.bytes.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/aaron/.npm/_logs/2019-11-14T21_41_32_512Z-debug.log
This issue persists regardless of the module I am trying to install....
Even after reverting to the original version of npm that was working, 6.12.1, these errors persist.
If I run npm install I get
npm WARN bashdemo#1.0.0 No description
npm WARN bashdemo#1.0.0 No repository field.
up to date in 0.636s
found 0 vulnerabilities
I tried clearing my caches, resetting, uninstalling, turning the linux subsystem off/on, restarting my computer each time, and reinstalling Ubuntu then going through the set up process, updating, upgrading, installing nvm using curl script on the github page about 3x now.
I tried, unmounting and remounting my /mnt/c/ following guides for previously reported issues that seemed similar. Which only served to make things worse, (prompting a reset and reinstall of Ubuntu terminal).
Another way you can get this error is that the windows C: drive is mounted with root ownership rather than user ownership.
See: chmod chown wsl improvements
The short answer is that you need to remount the C: drive with new permissions
sudo mount -t drvfs C: /mnt/c -o metadata,uid=1000,gid=1000,umask=22,fmask=111
A friend of mine helped me resolve this issue. Was a small and easy to overlook mistake on my part >.>
In short, It was resolved by just reinstalling node.js on windows... :/
During my update process, I uninstalled node.js to perform a clean installation. If I ran node -v in the bash terminal, I would see the version number and know that it was installed within the linux subsystem.
However, if I were to check in Powershell for node.js, I would find that it was not installed as I did not find a version number returned. I must have missed reinstalling Node back onto my machine. I Likely installed in a different place and in my nubbish confusion of uninstalling and reinstalling things, I neglected to put it back where I had it installed originally.
In conclusion, if you are using the linux subsystem as your command line terminal when working with node.js, make sure Node was properly installed on Windows.
P.S. I was not having the drive mounting issue others were having when getting this same type of error, so my issue resolved by reinstalling Node in the place I previously had it beforehand.
For me turning the antivirus off worked. It was not allowing edits to the folder.
I keep getting the same error message when trying to create a new angular project.
I tried to create a new angular project using Windows Powershell with the following commands:
ng new hello-world
-> Would you like to add angular routing? - Yes
-> Stylesheet format? - CSS
I obtained the error message below. I already tried to reinstall angular cli and I'm running Powershell using Administrator.
Installed versions:
Angular CLI: 8.0.6
Node: 10.16.0
OS: win32 x64
Error message:
npm WARN tarball data for tslint#~5.15.0 (sha512-6bIEujKR21/3nyeoX2uBnE8s+tMXCQXhqMmaIPJpHmXJoBJPTLcI7/VHRtUwMhnLVdwLqqY3zmd8Dxqa5CVdJA==) seems to be corrupted. Trying one more time.
npm WARN tarball tarball data for jasmine-spec-reporter#~4.2.1 (sha512-FZBoZu7VE5nR7Nilzy+Np8KuVIOxF4oXDPDknehCYBDE080EnlPu0afdZNmpGDBRCUBv3mj5qgqCRmk6W/K8vg==) seems to be corrupted. Trying one more time.
npm WARN tarball tarball data for acorn#^6.0.5 (sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==) seems to be corrupted. Trying one more time.
npm WARN tarball tarball data for #angular/language-service#~8.0.3 (sha512-04XojOo9FJgEQE/rZafnaJQxPEU+//TSzTgpGoIVzCSMx+joCY/ZSSwJZPWxiHlOE57W/zX02ZY+TwcM81oTdw==) seems to be corrupted. Trying one more time.
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\konta\Desktop\Programming_files\Angular\hello-world\node_modules\.staging\#angular\platform-browser-447d0944\esm2015\animations\src\animation_builder.js'
npm ERR! path C:\Users\konta\Desktop\Programming_files\Angular\hello-world\node_modules\.staging\jasmine-spec-reporter-cbb15ffc\screenshot.gif
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'C:\Users\konta\Desktop\Programming_files\Angular\hello-world\node_modules\.staging\jasmine-spec-reporter-cbb15ffc\screenshot.gif'
npm ERR! { [Error: EPERM: operation not permitted, unlink 'C:\Users\konta\Desktop\Programming_files\Angular\hello-world\node_modules\.staging\jasmine-spec-reporter-cbb15ffc\screenshot.gif']
npm ERR! cause:
npm ERR! { Error: EPERM: operation not permitted, unlink 'C:\Users\konta\Desktop\Programming_files\Angular\hello-world\node_modules\.staging\jasmine-spec-reporter-cbb15ffc\screenshot.gif'
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path:
npm ERR! 'C:\\Users\\konta\\Desktop\\Programming_files\\Angular\\hello-world\\node_modules\\.staging\\jasmine-spec-reporter-cbb15ffc\\screenshot.gif' },
npm ERR! stack:
npm ERR! 'Error: EPERM: operation not permitted, unlink \'C:\\Users\\konta\\Desktop\\Programming_files\\Angular\\hello-world\\node_modules\\.staging\\jasmine-spec-reporter-cbb15ffc\\screenshot.gif\'',
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path:
npm ERR! 'C:\\Users\\konta\\Desktop\\Programming_files\\Angular\\hello-world\\node_modules\\.staging\\jasmine-spec-reporter-cbb15ffc\\screenshot.gif',
npm ERR! parent: 'hello-world' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).
npm WARN tar EPERM: operation not permitted, lstat 'C:\Users\konta\Desktop\Programming_files\Angular\hello-world\node_modules\.staging\#angular\router-8388bfd5\esm2015\src\directives'
npm WARN tarball tarball data for typescript#3.4.4 (sha512-xt5RsIRCEaf6+j9AyOBgvVuAec0i92rgCaS3S+UVf5Z/vF2Hvtsw08wtUTJqp4djwznoAgjSxeCcU4r+CcDBJA==) seems to be corrupted. Trying one more time.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\konta\AppData\Roaming\npm-cache\_logs\2019-07-01T01_21_13_653Z-debug.log
Package install failed, see above.
I found the problem: My antivirus was somehow blocking the files without me knowing. It worked once I paused my antivirus during the installation.
In windows10 I disabled the windows defender / windows security ==> realtime protection and try again npm install command and it worked
1.
2.
3.
NOTE : Turn on the real time protection again after installation complete.
Restarting the machine worked for me.
I had this problem on MAC. I just added 'sudo' before the command and it worked.
sudo npm install -g parcel-bundler
I tried opening CMD with Run as Admisnistrator then run npm i and it worked for me
I'd just like to add a small little answer based on Qadir Hussain's answer.
If you disable "Realtime Protection" in Windows Security, you're going to leave your laptop or PC vulnerable to any viruses that may infect it when "Realtime Protection" is off. This may seem a bit impossible if you're only installing an NPM package, but some apps may have a hidden background process waiting for "Realtime Protection" to be disabled, and when it is, it could inject a virus.
That been said, there's still an option.
First things first, open Windows Security by typing "Windows Security" in the Start Menu and tap "Open".
After that, go to "Virus & Threat Protection".
Next, scroll down until you find "Manage Settings" under "Virus & Threat Protection Settings".
Then, scroll down until you see "Exclusions". Under "Exclusions" there's a link that says "Add or remove exclusions".
Once that's done, tap the button that says "Add an exclusion". Then tap "Folder" on the drop-down menu.
Choose the node_modules directory that is giving issues.
Last but not least, Allow administrative permissions.
Finally, exit Windows Security.
I wouldn't recommend excluding your entire Projects folder, as that will disable all scans for the directory.
Small disclaimer here, I'm only making this answer as a means of helping others without disabling "Realtime Protection". While I'm not encouraging this, this might help fix a common problem.
Have a good day. :)
For me, there are several possibilities:
Intercepted by anti-virus software, resulting in inoperability.
It is locked by IDE, resulting in inoperable.
The task is locked by npm running, resulting in inoperable.
Cancelling the npm start process and closing the terminal window (I use Hyper Terminal) worked for me (using Win 10).
I was then able to uninstall an npm package and install another.
I had visual studio code running. I turned it off and boom! worked for me!
To me, using Windows 10 the only thing that solved this problem was: exclude the node_modules folder, open Visual Studio Code in Admin mode in the project folder, and execute the following command:
npm install -g --unsafe-perm
For me the issue was with npm version I was using. I changed to a npm version which did not have the bug by using the below command:
npm install --global npm#8.3.1
I found this solution in a github issue:
Link to github issue
Hope it helps you like it did me!
was facing this problem and this is how it got solved :
-stoping the execution of the development server for both front-end and backend:
two things:
try admin.
make sure other processes does not occupying the folder/file
with me, it was not related to antivirus.
it appears that a process occupied this folder. in my case a node process occupied my node_modules folder.
i found it out by using process-explorer - i searched the path end found that a node process using this folder(even though I closed it! very common in windows), so i ended this process and then i did not got this error anymore.
I had the same issue What I have done wrong is I had set the npm registry to a local registry, without knowing that I faced this issue once I reset to globally using npm config set registry https://registry.npmjs.org/ error went away.
I tried everything above.
Deleting node_modules and re-installing did the trick for me.
This happened when I tried installing a new npm dependency, jest, with:
npm i --save-dev jest
I got it working by simply rerunning the command.
npm start
npm ERR! path C:\WINDOWS\System32\WindowsPowerShell\v1.0\package.json
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open 'C:\WINDOWS\System32\WindowsPowerShell\v1.0\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ATUL\AppData\Roaming\npm-cache\_logs\2017-10-01T10_20_21_068Z-debug.log
I am following the Wes-bos tutorial of learn-node. When I do npm start, it gives me these errors. Please help me. I have referred to all the previous questions. I am not able to find anything.
You have to run npm start in the root of the project you want to run, it seems you are runing npm start in a folder where there is not a package.json file.
The error says that you are running npm start in this path C:\WINDOWS\System32\WindowsPowerShell\v1.0\package.json but it seems that inside that folder you don't have a package.json file, so maybe you are in a wrong folder location.
So, if you downloaded some code to get started with, you should move to the root of that code and then run npm start.
If you are starting a new app, you have to run npm init first, that command will create a package.json file in the same location where you are in the console and then you will be able to run npm start.
I just had the same problem, so far I have never seen it.
But my solution was:
Rename the project folder (remove [], (), {} and special characters). Also try to remove spaces between words and if you continue the error try to join or just use (- or _) instead of space
Keep an eye on which folder is being performed. "When I didn't run: npm init -y" he would throw me to (C: \ WINDOWS \ System32 \ WindowsPowerShell \ v1.0 \ package.json), you don't want to run here,
use your project folder, change in the terminal to your folder: cd './c:\user\...\project'
Note: Solution tested in Windows - Visual Studio Code v1.56.0
nodejs vs-code visual-studio-code npm