npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
Tested with Node 18.12.1 / npm 8.19.2 and Node 16.13.2 / npm 8.1.2
I updated my Angular CLI the other day and received the following npm deprecation warning:
npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
It's just a warning so it didn't affect the CLI update and everything worked correctly, but I was curious to see what was causing it.
At first I thought it was because I wasn't using the latest version of the npm CLI (8.1.2
and Node.js (16.13.2
), so I updated to the latest LTS version of Node 18.12.1
and npm 8.19.2
and re-installed the Angular CLI, but the same npm warning appeared.
Then I had a look through the dependencies of the npm CLI running on my machine and found the culprit. The npm
package includes the dependencies "@npmcli/arborist": "^5.6.2"
and "cacache": "^16.1.3"
, and both of these packages still use the now deprecated "@npmcli/move-file": "^2.0.0"
.
npm dependencies
Here's a cut down version of my npm
package.json file including the dependencies that cause the warning:
{
"version": "8.19.2",
"name": "npm",
"description": "a package manager for JavaScript",
...
"dependencies": {
...
"@npmcli/arborist": "^5.6.2",
...
"cacache": "^16.1.3",
...
},
...
}
@npmcli/arborist dependencies
Here's a cut down version of the @npmcli/arborist
package.json file that includes the dependency on @npmcli/move-file
:
{
"name": "@npmcli/arborist",
"version": "5.6.2",
"description": "Manage node_modules trees",
"dependencies": {
...
"@npmcli/move-file": "^2.0.0",
...
},
...
}
cacache dependencies
And here's a cut down version of the cacache
package.json file that includes the dependency on @npmcli/move-file
:
{
"name": "cacache",
"version": "16.1.3",
...
"description": "Fast, fault-tolerant, cross-platform, disk-based, data-agnostic, content-addressable cache.",
...
"dependencies": {
...
"@npmcli/move-file": "^2.0.0",
...
},
...
}
It looks like packages are being switched over to @npmcli/fs
which should remove the warning in future versions. Here's a recent commit on the cacache
GitHub repo to fix it - https://github.com/npm/cacache/commit/4a7382f5e6c72c59587d45167346c1b6e81a3cde.
Subscribe or Follow Me For Updates
Subscribe to my YouTube channel or follow me on Twitter, Facebook or GitHub to be notified when I post new content.
- Subscribe on YouTube at https://www.youtube.com/JasonWatmore
- Follow me on Twitter at https://twitter.com/jason_watmore
- Follow me on Facebook at https://www.facebook.com/JasonWatmoreBlog
- Follow me on GitHub at https://github.com/cornflourblue
- Feed formats available: RSS, Atom, JSON
Other than coding...
I'm currently attempting to travel around Australia by motorcycle with my wife Tina on a pair of Royal Enfield Himalayans. You can follow our adventures on YouTube, Instagram and Facebook.
- Subscribe on YouTube at https://www.youtube.com/TinaAndJason
- Follow us on Instagram at https://www.instagram.com/tinaandjason
- Follow us on Facebook at https://www.facebook.com/TinaAndJasonVlog
- Visit our website at https://tinaandjason.com.au
Need Some npm Help?
Search fiverr to find help quickly from experienced npm developers.