npm ERR! `disturl` is not a valid npm option
时间: 2023-09-26 10:10:07 浏览: 1291
npm install ERR
The error message you encountered indicates that `disturl` is not a valid option in npm. `disturl` was previously used in older versions of npm to specify the URL for downloading binary packages. However, it is no longer a supported option in recent versions of npm.
If you are trying to set a custom registry URL, you can use the `registry` option instead. Here's an example of how you can set the registry URL using npm:
```
npm config set registry <registry_url>
```
Replace `<registry_url>` with the URL of the registry you want to use. For example, if you want to use the official npm registry, you can set it like this:
```
npm config set registry https://registry.npmjs.org/
```
Make sure to run the command in your terminal or command prompt. This will update the npm configuration file with the specified registry URL.
If you have any further questions, feel free to ask!
阅读全文