记录npm run init / eslint-config-wxapp 0.5.2出错解决方法
1.修改配置:pageage.json里的 "@tencent/eslint-config-wxapp": "^0.5.2" 改为 "eslint-config-wxapp": "^1.0.0" 2.npm install --legacy-peer-deps 3.npm run init --legacy-peer-deps 4.完成上述步骤后,使用微信开发者工具,点击【工具-构建npm】
感谢评论区各位大佬,内容都取自issues区,在这不一一列出,希望后面遇到相同问题的朋友可以参考
大佬,这个怎么解决呢? npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/@tencent%2feslint-config-wxapp - Not found npm ERR! 404 npm ERR! 404 '@tencent/eslint-config-wxapp@^1.0.0' is not in this registry. npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url.
大佬,这个怎么解决呢? npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/@tencent%2feslint-config-wxapp - Not found npm ERR! 404 npm ERR! 404 '@tencent/eslint-config-wxapp@^1.0.0' is not in this registry. npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url.
看第一条:1.修改配置:pageage.json里的 "@tencent/eslint-config-wxapp": "^0.5.2" 改为 "eslint-config-wxapp": "^1.0.0"
大佬,这个怎么解决呢? npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/@tencent%2feslint-config-wxapp - Not found npm ERR! 404 npm ERR! 404 '@tencent/eslint-config-wxapp@^1.0.0' is not in this registry. npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url.
是 eslint-config-wxapp 不是 @tencent/eslint-config-wxapp
我的解决方案:直接删掉package.json文件下devDependencies的"@tencent/eslint-config-wxapp": "^0.5.2",因为npmjs.com中根本就没有这个包,并且.eslintec.js也没有使用到eslint-config-wxapp这个配置,所以可以直接删除@tencent/eslint-config-wxapp这个包。
删除后再安装依赖
npm i --legacy-peer-deps