Error from chokidar (D:\): Error: EBUSY: resource busy or locked, lstat 'D:\pagefile.sys' - vue.js

I keep running into problem when I tried to run my Vue app today using the npm run serve command. I've done this countless time with the same repository but it gave this error when I started it just now.
This dependency was not found:
* node:console in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/News.vue?vue&type=script&lang=js&
To install it, you can run: npm install --save node:console
Error from chokidar (D:\): Error: EBUSY: resource busy or locked, lstat 'D:\pagefile.sys'
What I have tried to fix the problem:
Updates all the packages using npm install
Deleted the node_modules folder and reinstalled the entire dependency
Reload the git repository to the point where it still worked previously
Installed node:console using the command npm install --save node:console which returns the following error instead:
npm ERR! code EUNSUPPORTEDPROTOCOL
npm ERR! Unsupported URL Type "node:": node:console
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Roaming\npm-cache\_logs\2021-06-03T16_45_28_752Z-debug.log
Obviously, none of the fixes had work.

Nevermind my error. It seems in my careless mistake I've appended import {timeEnd} from 'node:console' to the News.vue file just prior to creating a commit

execute command as admin
powercfg -h off

Related

Unable to install yarn through npm

I am trying to install yarn through npm on Mac by referring the documentation given here: https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable
npm install --global yarn
However when I run this command in terminal, I am getting the following error and the package is not being installed
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
I also ran this command but nothing happened. I am also seeing messages like - this operation was rejected by your operating system. I haven't used yarn in a year, and everything was working fine, but suddenly I am running into all this. Would love to know what I am doing wrong here and how I can resolve this.
This the error message that comes
The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
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.
sudo npm install --location=global yarn
This command worked for me
As warning messages indicate, global -global and -local appear to be deprecated. However, instead of global, you can use the -location=global command.
-global and -local is deprecated.
Use This command:
npm install --location=global create-react-app
Instead of:
npm install -g create-react-app

"PulseTile-RA" cannot run. Is it an npm dependency issue?

I wanted to experiment with this project based on react-admin:
https://github.com/PulseTile/PulseTile-RA
So I downloaded the code, run npm install and I got a lot of errors from NPM mainly axios version corrupted.
Example:
npm ERR! code EINTEGRITY
npm ERR! sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI= integrity checksum failed when using sha1: wanted sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI= but got sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g== sha1-/z8N4ue10YDnV62YAA8Qgbh7zqM=. (75833 bytes)
npm WARN tarball tarball data for js-yaml#3.13.1 (sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==) seems to be corrupted. Trying one more time.
npm ERR! code EINTEGRITY
npm ERR! sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ== integrity checksum failed when using sha512: wanted sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ== but got sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==. (74050 bytes)
npm WARN tar ENOENT: no such file or directory, open 'C:\nodejs\xxx\PulseTile-RA\node_modules\.staging\babel-plugin-transform-object-rest-spread-7e34a6f0\package.json'*
When I do npm start I get an error that react-scripts doesn't exist.
I tried workarounds for similar errors on stackoverflow but without success. And yet still, I cannot get it to run. I have latest NPM, node on windows 10.
Please advise on NPM issues as I think this is the source of this project issue of not starting.
Thank you
So technically, this has more to do with npm than the actual project.
In fact, this issue reported to the npm repository would help.
But here are some quick steps that should help:
Since you're in windows-10, it's advisable to run the "delete" commands within git bash.
Go to the project directory (root folder)
Delete the node_modules directory: rm -rf node_modules
Delete package-lock.json file:rm package-lock.json`
Clear the cache: npm cache clean --force
Run npm install --verbose
If it doesn't help, then please follow more instructions here

Installation of npm lite-server gives an error

While following the Petshop tutorial, the final step requires the installation of lite-server from npm for the project to run on my browser (Firefox).
I tried the following command for installation, with PowerShell in administrator mode:
npm i lite-server -g
This gave me the following error message:
npm ERR! Unexpected end of JSON input while parsing near '...61d4d38b3260af8ae4e7"'
npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\Ubaba\AppData\Roaming\npm-cache_logs\2020-04-09T10_10_51_353Z-debug.log
I tried all the solutions mentioned on this page, but none of them seem to be working.
It seems an issue with the NPM mirror
Try this : npm cache clean --force
and after retry install Lite-server.
regards

I can't install anything with npm command line

I have been using npm for some time with ionic. Recently, it started giving an error when trying to install anything both packages and modules. Even with react native it gives the same error.
I have tried re-installing it, but that didn't fix it. I created a new user on my Windows system, but it's still not working, and I noticed that when I search for the error code on Google, I get no results.
C:\WINDOWS\system32>npm install -g ionic
npm ERR! error:0909006C:PEM routines:get_name:no start line
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\OLAMIDE AWOBUSUYI\AppData\Roaming\npm-cache_logs\2019-07-11T19_47_18_673Z-debug.logenter image description here
Try to set the npm registry:
npm set registry http://registry.npmjs.org/

`npm install` gives ENOENT errno -2 re missing dezalgo module

I'm trying to run npm install for a little ember-driven site that I've got, but it throws the following error:
npm ERR! path /Projects/Etc/Admin/cuscus/node_modules/npm/node_modules/dezalgo
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/Projects/Etc/Admin/cuscus/node_modules/npm/node_modules/dezalgo' -> '/Projects/Etc/Admin/cuscus/node_modules/npm/node_modules/.dezalgo.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! /Users/mick/.npm/_logs/2018-01-09T01_18_51_322Z-debug.log
If I delete the node_modules directory completely then run npm install again it seems to work, but running it again fails.
What you can try is:
Be sure that you use cmd promt in Admin mode.
If you use VS Code, kill all node procceses. Close it and try again.
Delete package-lock.json and node-modules folder and try again.
Change the node version. For example try the old one v6.11.2
Try to do npm cache clean --force
Try to remove {package}.DELETE in ~/AppData/Roaming/npm/node_modules after the initial npm i -g {package} and retry npm i -g {package}
One of it can help. But not for sure. The status of issue with this problem is open for the moment.
https://github.com/npm/npm/issues/17444
I just had this issue when setting up a new machine. None of the cache clean/uninstall/reinstall steps worked for me.
However, I was able to resolve it by updating npm to the latest version. I had 5.6.0 installed, but using npm-windows-upgrade to install the latest version (5.7.1) cleared up the dependency issues.
See this answer for more information on upgrading npm on Windows:
https://stackoverflow.com/a/31520672/91189
This most likely happened because you updated your node version and because you probably already had this repo sitting on your machine before that particular update, the package-lock.json file whose sole purpose is to track the present and past state of your node_modules file and maintain a very updated dependency tree such that amongst entities using your code there will be consistency installing exactly the same dependencies ;
Entities using your code include
Teammates
Deployments (AWS ECS),
and Continuous integration tools like Travis CI that are running your code,
Try to delete the package-lock.json file. Run the npm install command and you should be fine.
The last thing you should try doing is deleting the missing package if you are not sure of what you are doing, it's usually better to avoid this.
Goodluck.