node.js - 在 Centos 7 上安装 Nest.js

标签 node.js npm centos7

我在 CentOS 7 上安装 Nest.js。我收到此错误:

file:///usr/lib/node_modules/@nestjs/cli/node_modules/@nuxtjs/opencollective/src/index.js:7
  ;(async () => {
          ^

SyntaxError: Unexpected token (
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.2 (node_modules/@nestjs/cli/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! Linux 3.10.0-693.21.1.el7.x86_64
npm ERR! argv "/usr/bin/node" "/bin/npm" "i" "-g" "@nestjs/cli"
npm ERR! node v6.14.3
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! @nestjs/cli@5.5.0 postinstall: `opencollective`
npm ERR! Exit status 1

有什么想法吗?

最佳答案

答案就在错误消息中:

npm ERR! node v6.14.3

不确定您要尝试安装哪个版本的 nest.js,但当前版本有此要求:

"engines": {
  "node": ">= 8.9.0"
},

查看官方nest.js packages.json .

关于node.js - 在 Centos 7 上安装 Nest.js,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52913928/

相关文章:

javascript - 无法从React应用程序中的redux库导入商店

node.js - 如何在已部署的 Heroku NodeJS 应用程序上运行 npm 脚本

git - npm install,缺少node_modules文件夹

node.js - 我真的搞砸了 NPM

python-3.x - urllib.error.URLError : <urlopen error [Errno 113] No route to host>

node.js - 获取连接超时。游泳池可能已满。更新 10000 行时出错

node.js - 如何发布一个可以在WebStorm中自动导入的npm模块?

node.js - 安装 Apache Cordova - cordova : command not found

python - 将 python 守护进程添加到 systemd

docker - 如何在 CentOS 7 docker 上安装 gcc/g++ 9 (centos :7)