miniprogram-demo icon indicating copy to clipboard operation
miniprogram-demo copied to clipboard

记录npm run init / eslint-config-wxapp 0.5.2出错解决方法

Open Popcars opened this issue 2 years ago • 4 comments

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区,在这不一一列出,希望后面遇到相同问题的朋友可以参考

Popcars avatar May 25 '23 05:05 Popcars

大佬,这个怎么解决呢? 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.

ace825093791 avatar Jun 11 '23 02:06 ace825093791

大佬,这个怎么解决呢? 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"

Popcars avatar Jul 14 '23 01:07 Popcars

大佬,这个怎么解决呢? 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

Yukino1 avatar Jul 23 '23 03:07 Yukino1

我的解决方案:直接删掉package.json文件下devDependencies"@tencent/eslint-config-wxapp": "^0.5.2",因为npmjs.com中根本就没有这个包,并且.eslintec.js也没有使用到eslint-config-wxapp这个配置,所以可以直接删除@tencent/eslint-config-wxapp这个包。 image

删除后再安装依赖 npm i --legacy-peer-deps

image

AlanLee97 avatar Sep 08 '23 14:09 AlanLee97