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.
Need Some npm Help?
Search fiverr for freelance npm developers.
Follow me for updates
When I'm not coding...
Me and Tina are on a motorcycle adventure around Australia.
Come along for the ride!