In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to solve the problem of npm error reporting". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn how to solve the problem of npm error reporting.
1. Npm installation dependency failure
Problem description:
Error message: unbuild: sill gentlyRm target.inParent = false
There will be a long stay in the future.
Problem solving: delete the entire node_modules and re-npm install
2. Npm lockfile reported an error
Problem description:
This is a prompt due to a version problem.
Error message:
Npm WARN old lockfile
Npm WARN old lockfile The package-lock.json file was created with an old version of npm
Npm WARN old lockfile so supplemental metadata must be fetched from the registry.
Npm WARN old lockfile
Npm WARN old lockfile This is an one-time fix-up, please be patient...
Npm WARN old lockfile
Problem solving:
Ignore it. This is just a warning, and the npm that happened is just adding information to the package-lock.json file.
Npm was downgraded to the old version in production. Consider running npm version 6 NPM I npm@6-g or npm-g install npm@6
If you already have a new version of npm installed, to keep the newer version, run a npm command using the old version, which can be executed using npx. Use the-p flag to specify the version that npm wants. For example, running npx-p npm@6 npm ci even if version 7 is installed will cause npm ci to run as npm version 6.
Third, npm ERR! Code EPERM problem
Problem description:
This is due to the problem caused by third parties such as git bash here,vs code not running as an administrator. Basically, git bash here is encapsulated by the windows dos command. However, when cmd runs as an administrator, you need to locate to the corresponding folder (you need to enter the corresponding disk first, and then enter the corresponding file, which is more troublesome), but you can operate directly under the corresponding folder if you enter from a third party, which is also more convenient.
Error message:
$npm install
Npm WARN tarball tarball data for typescript@3.0.3 (sha1-SFOz4nXs2qJ/eP2kbcJzp+t
/ wcg=) seems to be corrupted. Trying one more time.
Npm ERR! Path E:\ vue-typescript\ node_modules\ .staging\ typescript-10ba8b53\ lib\ ty
PescriptServices.js
Npm ERR! Code EPERM
Npm ERR! Errno-4048
Npm ERR! Syscall unlink
Npm ERR! Error: EPERM: operation not permitted, unlink'e:\ vue-typescript\ node_m
Odules\ .staging\ typescript-10ba8b53\ lib\ typescriptServices.js'
Npm ERR! {Error: EPERM: operation not permitted, unlink'e:\ vue-typescript\ nod
E_modules\ .staging\ typescript-10ba8b53\ lib\ typescriptServices.js'
Npm ERR! Cause:
Npm ERR! {Error: EPERM: operation not permitted, unlink'e:\ vue-typescript\ n
Ode_modules\ .staging\ typescript-10ba8b53\ lib\ typescriptServices.js'
Npm ERR! Errno:-4048
Npm ERR! Code: 'EPERM'
Npm ERR! Syscall: 'unlink'
Npm ERR! Path:'e:\\ vue-typescript\\ node_modules\\ .staging\\ typescript-10ba
8b53\\ lib\\ typescriptServices.js'}
Npm ERR! Stack: 'Error: EPERM: operation not permitted, unlink\' E:\\ vue-types
Cript\\ node_modules\\ .staging\ typescript-10ba8b53\\ lib\ typescriptServices.js\'
'To
Npm ERR! Errno:-4048
Npm ERR! Code: 'EPERM'
Npm ERR! Syscall: 'unlink'
Npm ERR! Path:'e:\\ vue-typescript\\ node_modules\\ .staging\\ typescript-10ba8b5
3\\ lib\\ typescriptServices.js'
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 ant
Ivirus)
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 t
He
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
)。
Problem solving:
The .npmrc file needs to be deleted
Emphasis: not the npmrc file under the npm module in the nodejs installation directory
But the .npmrc file under C:\ Users\ {account}\
Eg: mine is C:\ Users\ zhuzhu, and there is a .npmrc below
4. Npm ERR! Code EEXIST (file already exists, refuse to delete)
Problem description:
Npm ERR! Code EEXIST
Npm ERR! File exists: e:\ software\ node.js\ node_global\ vue
Npm ERR! Remove the existing file and try again, or run npm
Npm ERR! With-- force to overwrite files recklessly.
If prompted, add-force Enforcement
Problem solving:
Clean the cache
Npm cache clean-- force or clean the node_cache cache
Re-perform a global installation or enforce
Npm install @ vue/cli-g or npm install-g @ vue/cli-- force
Add: delete the node_modules folder through the npm command
First install and remove the tool through npm
Npm install rimraf-g
After installing the Taobao image, you can use the
Cnpm install rimraf-g command line statement, which will be faster
When using the delete command
Rimraf node_modules
You can try to delete the node_modules file of this project.
Delete the entire project directly to the installation directory and move it to the Recycle Bin
At this point, I believe you have a deeper understanding of "how to solve the problem of npm error reporting". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.