当我尝试安装gatsby时,它已成功安装,但在gatsby-cli期间出现错误,如下所述。
[Container] 2020/06/24 17:33:22 Running command npm install -g gatsby-cli
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN acorn-dynamic-import@4.0.0 requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm ERR! code EEXIST
npm ERR! syscall symlink
npm ERR! path ../lib/node_modules/gatsby-cli/cli.js
npm ERR! dest /usr/local/bin/gatsby
npm ERR! errno -17
npm ERR! EEXIST: file already exists, symlink '../lib/node_modules/gatsby-cli/cli.js' -> '/usr/local/bin/gatsby'
npm ERR! File exists: /usr/local/bin/gatsby
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-06-24T17_33_41_230Z-debug.log
[Container] 2020/06/24 17:33:41 Command did not exit successfully npm install -g gatsby-cli exit status 239
[Container] 2020/06/24 17:33:41 Phase complete: INSTALL State: FAILED
[Container] 2020/06/24 17:33:41 Phase context status code: COMMAND_EXECUTION_ERROR Message:
Error while executing command: npm install -g gatsby-cli. Reason: exit status 239