我无法安装特定的节点模块[ejs]

要学习node.js,我想构建一个简单的网站。为此,我想使用ejs。但是,安装ejs总是失败。我在多台机器上用不同的方法尝试过。 在npm的设置中使用Webstorms内置方法,并在网络服务器上使用Plesk时,出现以下错误:

npm WARN lifecycle npm is using /opt/plesk/node/12/bin/node but there is no node binary in the current PATH. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
sh: node: command not found
npm WARN bootstrap@4.4.1 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
npm WARN bootstrap@4.4.1 requires a peer of popper.js@^1.16.0 but none is installed. You must install peer dependencies yourself.
npm WARN project@1.0.0 No description
npm WARN project@1.0.0 No repository field.
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! ejs@3.1.2 postinstall: `node --harmony ./postinstall.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the ejs@3.1.2 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Webstorm在本地计算机上给我一个非常相似的错误。我尝试过的任何其他npm软件包都可以正常工作。我安装了express,bootstrap,jquery等。问题似乎仅在于ejs。

有什么建议?还有一个问题是,我只能在Web服务器上提供Plesk所提供的功能,因为我没有以普通用户身份运行node或npm的权限。

评论