首页 > 解决方案 > 尝试安装未找到 @sinonjs/commons 的 sinon 时出现错误,并带有短语“名称只能包含 URL 友好字符”

问题描述

我正在尝试安装 sinon,但出现以下错误:

npm ERR! 404  '@sinonjs/commons@^1.3.0' is not in the npm registry.
npm ERR! 404 Your package name is not valid, because
npm ERR! 404  1. name can only contain URL-friendly characters
npm ERR! 404 It was specified as a dependency of 'sinon'

节点版本:10.15.1

NPM 版本:6.8.0

我尝试运行:

npm install --save-dev sinon

我检查了我的 NPM 注册表是https://registry.npmjs.org/

标签: node.jsnpmsinon

解决方案



推荐阅读