我尝试遵循angular cli教程来创建Angular应用。但是,它在量角器5.4.0上引发错误。
这是错误消息:
npm ERR! code ETARGET
npm ERR! notarget No matching version found for protractor@~5.4.0
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'angulartest6'
npm ERR! notarget
量角器的最新版本是5.4.0。我也尝试手动安装,但是会引发此错误: npm ERR!没有找到针对protractor@5.4.0的匹配版本
什么是解决方法,以便我不会收到此错误?
答案 0 :(得分:0)
您可以尝试将以下内容添加到package.json
文件中吗?
"dependencies": {
"protractor": "5.4.0"
}