如何在plesk上安装npm软件包?

时间:2020-09-01 06:58:39

标签: node.js npm plesk

我想将node-apk-parser:https://www.npmjs.com/package/node-apk-parser安装到我的node js项目中。如果我在VS软件包管理器控制台上运行npm install,它将在本地工作。但是,当我在Plesk上更新package.json并按下Npm Install按钮并运行我的网站域时,它说“ 节点apk解析器未找到模块错误”?节点apk解析器位于最后。 这是我的package.json文件。

{
  "name": "nodejs-express-mysql",
  "version": "1.0.0",
  "description": "Node.js Restful CRUD API with Node.js, Express and MySQL",
  "main": "server.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [
    "nodejs",
    "express",
    "express-fileupload",
    "mysql",
    "restapi"
  ],
  "author": "bezkoder",
  "license": "ISC",
  "dependencies": {
    "body-parser": "^1.19.0",
    "express": "^4.17.1",
    "express-fileupload": "^1.2.0",
    "mysql": "^2.17.1",
    "cors": "^2.8.5"
  },
  "node-apk-parser": {
    "version": "0.2.3",
    "resolved": "https://registry.npmjs.org/node-apk-parser/-/node-apk-parser-0.2.3.tgz",
    "integrity": "sha1-OFoUGm2jjeVi5dnwiWG/lyTTX8Q=",
    "requires": {
      "adm-zip": "~0.4.4",
      "debug": "~0.7.4"
    }
  }
}

1 个答案:

答案 0 :(得分:0)

我必须在package.json中编写自己的脚本,然后运行脚本。提到了这个问题:Install node-sass on plesk