.nmprc我在项目目录中创建了一个文件:
@mycompany:registry=https://registry.mycompany.com/
Run Code Online (Sandbox Code Playgroud)
但是,当我这样做时,npm install我看到不以 开头的包依赖项@mycompany也从 开始安装https://registry.mycompany.com/,而不是从 开始安装https://registry.npmjs.org/。
这是我在中看到的package-lock.json:
"yaml": {
"version": "1.7.2",
"resolved": "https://registry.mycompany.com/yaml/-/yaml-1.7.2.tgz",
"integrity": "sha512-qXROVp90sb83XtAoqE8bP9RwAkTTZbugRUTm5YeFCBfNRPEp2YzTeqWiz7m5OORHzEvrA/qcGS8hp/E+MMROYw==",
"dev": true,
"requires": {
"@babel/runtime": "^7.6.3"
}
Run Code Online (Sandbox Code Playgroud)