如何解决Heroku CI / CD,带有npm专用软件包
任何人都知道这里的问题是什么,似乎正在将我的npm注册表评估为False。我正在从私有范围安装软件包。 我还添加了.npmrc文件并添加了
@scope:registry=https://registry.npm.org
//registry.npmjs.org/:_authToken=${NPM_PRIVATE_TOKEN}
当我在控制台中从heroku中回显变量时,我看到已经设置了NPM_PRIVATE_TOKEN
heroku config:get NPM_PRIVATE_TOKEN --app xxxxx
xxxx-xxxx-xxxx-xxx-xxxxxxxx
Total 530 (delta 244),reused 331 (delta 140)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONfig_LOGLEVEL=error
remote: NPM_CONfig_PRODUCTION=False
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote: NODE_VERBOSE=false
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): 12.x.x
remote: engines.npm (package.json): 6.x.x
remote:
remote: Resolving node version 12.x.x...
remote: Downloading and installing node 12.18.4...
remote: Bootstrapping npm 6.x.x (replacing 6.14.6)...
remote: npm 6.x.x installed
remote:
remote: -----> Installing dependencies
remote: Installing node modules (package.json)
remote: npm ERR! code E404
remote: npm ERR! 404 Not Found - GET https://registry.npmjs.org/False - Not found
remote: npm ERR! 404
remote: npm ERR! 404 'False@latest' is not in the npm registry.
remote: npm ERR! 404 Your package name is not valid,because
remote: npm ERR! 404 1. name can no longer contain capital letters
remote: npm ERR! 404
remote: npm ERR! 404 Note that you can also install from a
remote: npm ERR! 404 tarball,folder,http url,or git url.
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR! /tmp/npmcache.QbXAj/_logs/2020-09-24T17_46_48_753Z-debug.log
remote:
remote: -----> Build Failed
remote:
remote: We're sorry this build is failing! You can troubleshoot common issues here:
remote: https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:
remote: If you're stuck,please submit a ticket so we can help:
remote: https://help.heroku.com/
remote:
remote: love,remote: Heroku
remote:
remote: ! Push rejected,Failed to compile Node.js app.
remote:
remote: ! Push Failed
rem
解决方法
这对我来说是一个愚蠢的错误,我正在设置环境变量并意外设置了
NPM_CONFIG_PRODUCTION
到False
而不是false
。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。