Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "npm:" prefix in dependency section in package.json mean?

I am wondering what does that mean:

"dependencies": {
    "@mui/styled-engine": "npm:@mui/[email protected]",
}

What is that npm: prefix?

like image 589
karlosos Avatar asked Oct 22 '25 15:10

karlosos


2 Answers

https://github.com/npm/cli/commit/b7b54f2d18e2d8d65ec67c850b21ae9f01c60e7e

this commit introduced aliasing to npm cli

like image 181
Alan Kałuża Avatar answered Oct 25 '25 04:10

Alan Kałuża


Probably telling npm where to get the package from (in this case npm): https://docs.npmjs.com/cli/v8/configuring-npm/package-json#dependencies

There's also file: and git: as you can see.

like image 37
catgirlkelly Avatar answered Oct 25 '25 04:10

catgirlkelly