[英]Deploying node.js to azure web app Via Github Actions, I keep failing my build due to some error that i quoted and screenshot below. Please & Ty
["npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it! ["npm WARN read-shrinkwrap 这个版本的npm是和lockfileVersion@1兼容的,但是package-lock.json是为lockfileVersion@2生成的。我会努力做到最好的!
core-js@3.21.1 postinstall /home/runner/work/team-mario-p2-frontend/team-mario-p2-frontend/node_modules/core-js node -e "try{require('./postinstall')}catch(e){}"
core-js@3.21.1 postinstall /home/runner/work/team-mario-p2-frontend/team-mario-p2-frontend/node_modules/core-js node -e "try{require('./postinstall') }赶上(e){}”
core-js-pure@3.21.1 postinstall /home/runner/work/team-mario-p2-frontend/team-mario-p2-frontend/node_modules/core-js-pure node -e "try{require('./postinstall')}catch(e){}"
core-js-pure@3.21.1 postinstall /home/runner/work/team-mario-p2-frontend/team-mario-p2-frontend/node_modules/core-js-pure node -e "try{require('. /postinstall')}catch(e){}"
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
Most likely your problem is that you're using different npm versions locally and in actions.您的问题很可能是您在本地和操作中使用了不同的 npm 版本。
If this is the issue, then you can resolve it by specifying a different node version with the setup-node action .如果这是问题所在,那么您可以通过使用setup-node 操作指定不同的节点版本来解决它。 For example, specifying node 16 means you'll get npm 8.
例如,指定节点 16 意味着您将获得 npm 8。
Specifying node 12, on the other hand, will lead to npm 6. npm 6 is also what causes lockfile version 1 while npm 8 uses lockfile version 2.另一方面,指定节点 12 将导致 npm 6。npm 6 也是导致锁定文件版本 1 而 npm 8 使用锁定文件版本 2 的原因。
Sample:样本:
uses: actions/setup-node@v3
with:
node-version: 16
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.