已安装 Plesk npm 12,但显示 6.9.0
Plesk npm 12 installed, but showing 6.9.0
我已经从 upgrade/install 包中安装了 Node.js 没有任何问题,但是当我尝试 运行 以下内容时: /opt/plesk/node/12/bin/node -v
我得到的输出是:
12.4.0
问题是,当我尝试使用 Bootstrap 为 Laravel 安装身份验证时,我到了需要 运行 的地步:npm install && npm run dev
我当 运行ning /opt/plesk/node/12/bin/npm run dev
:
时出现以下错误
Error: You are using an unspported version of Node. Please update to
at least Node v12.14
我好像运行已经是最新版本了,但是还是报错版本号? - 如何解决?
更新(调试日志):
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/opt/plesk/node/12/bin/node',
1 verbose cli '/opt/plesk/node/12/bin/npm',
1 verbose cli 'run',
1 verbose cli 'dev'
1 verbose cli ]
2 info using npm@6.9.0
3 info using node@v12.4.0
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle @~predev: @
6 info lifecycle @~dev: @
7 verbose lifecycle @~dev: unsafe-perm in lifecycle true
8 verbose lifecycle @~dev: PATH: /opt/plesk/node/12/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/var/www/vhosts/domain.com/httpdocs2/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/us$
9 verbose lifecycle @~dev: CWD: /var/www/vhosts/domain.com/httpdocs2
10 silly lifecycle @~dev: Args: [ '-c', 'npm run development' ]
11 silly lifecycle @~dev: Returned: code: 1 signal: null
12 info lifecycle @~dev: Failed to exec dev script
13 verbose stack Error: @ dev: `npm run development`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/opt/plesk/node/12/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:200:13)
13 verbose stack at ChildProcess.<anonymous> (/opt/plesk/node/12/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:200:13)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid @
15 verbose cwd /var/www/vhosts/domain.com/httpdocs2
16 verbose Linux 4.15.0-126-generic
17 verbose argv "/opt/plesk/node/12/bin/node" "/opt/plesk/node/12/bin/npm" "run" "dev"
18 verbose node v12.4.0
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error @ dev: `npm run development`
22 error Exit status 1
23 error Failed at the @ dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
非常感谢 NullDev 引领我走向正确的方向!
我在这里找到了答案:How to add a new node.js version for the Node.js Manager on Plesk?
- 我们需要安装 Node Version Manager
- 然后安装我们想要的任何版本(我想要最新的 v14.15.4)
- 然后我们将该版本复制到 Plesk 默认节点版本路径
- 最后我们将创建的新版本告诉 Plesk
- 然后在所有已安装版本的列表中,我们刷新,瞧,我们现在支持 v14.15.4
这归功于 Maertz
我已经从 upgrade/install 包中安装了 Node.js 没有任何问题,但是当我尝试 运行 以下内容时: /opt/plesk/node/12/bin/node -v
我得到的输出是:
12.4.0
问题是,当我尝试使用 Bootstrap 为 Laravel 安装身份验证时,我到了需要 运行 的地步:npm install && npm run dev
我当 运行ning /opt/plesk/node/12/bin/npm run dev
:
Error: You are using an unspported version of Node. Please update to at least Node v12.14
我好像运行已经是最新版本了,但是还是报错版本号? - 如何解决?
更新(调试日志):
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/opt/plesk/node/12/bin/node',
1 verbose cli '/opt/plesk/node/12/bin/npm',
1 verbose cli 'run',
1 verbose cli 'dev'
1 verbose cli ]
2 info using npm@6.9.0
3 info using node@v12.4.0
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle @~predev: @
6 info lifecycle @~dev: @
7 verbose lifecycle @~dev: unsafe-perm in lifecycle true
8 verbose lifecycle @~dev: PATH: /opt/plesk/node/12/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/var/www/vhosts/domain.com/httpdocs2/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/us$
9 verbose lifecycle @~dev: CWD: /var/www/vhosts/domain.com/httpdocs2
10 silly lifecycle @~dev: Args: [ '-c', 'npm run development' ]
11 silly lifecycle @~dev: Returned: code: 1 signal: null
12 info lifecycle @~dev: Failed to exec dev script
13 verbose stack Error: @ dev: `npm run development`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/opt/plesk/node/12/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:200:13)
13 verbose stack at ChildProcess.<anonymous> (/opt/plesk/node/12/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:200:13)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid @
15 verbose cwd /var/www/vhosts/domain.com/httpdocs2
16 verbose Linux 4.15.0-126-generic
17 verbose argv "/opt/plesk/node/12/bin/node" "/opt/plesk/node/12/bin/npm" "run" "dev"
18 verbose node v12.4.0
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error @ dev: `npm run development`
22 error Exit status 1
23 error Failed at the @ dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
非常感谢 NullDev 引领我走向正确的方向!
我在这里找到了答案:How to add a new node.js version for the Node.js Manager on Plesk?
- 我们需要安装 Node Version Manager
- 然后安装我们想要的任何版本(我想要最新的 v14.15.4)
- 然后我们将该版本复制到 Plesk 默认节点版本路径
- 最后我们将创建的新版本告诉 Plesk
- 然后在所有已安装版本的列表中,我们刷新,瞧,我们现在支持 v14.15.4
这归功于 Maertz