簡體   English   中英

帶有 npm 私有包的 Heroku CI/CD

[英]Heroku CI/CD with npm private packages

任何人都知道這里的問題是什么,它似乎正在將我的 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.xx remote: engines.npm (package.json): 6.xx remote: remote: Resolving node version 12.xx.. remote: Downloading and installing node 12.18.4... remote: Bootstrapping npm 6.xx (replacing 6.14.6)... remote: npm 6.xx 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

好吧,這對我來說是一個愚蠢的錯誤,我正在設置我的 env 變量並意外地將NPM_CONFIG_PRODUCTION設置為False而不是false

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM