简体   繁体   English

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

[英]How to install npm packages on plesk?

I wanted to install node-apk-parser: https://www.npmjs.com/package/node-apk-parser into my node.js project.It works locally if I run npm install on my VS package manager console.我想将 node-apk-parser: https://www.npmjs.com/package/node-apk-parser安装到我的 node.js 项目中。如果我在我的 VS package 管理器控制台上运行 npm 安装,它会在本地工作。 But when I update the package.json on Plesk and hit the button Npm Install and I run my website domain it says " Module not found error for node apk parser "?Node apk parser is at the last.但是,当我在 Plesk 上更新 package.json 并点击按钮 Npm 安装并运行我的网站域时,它显示“找不到节点 apk 解析器的模块错误”?节点 apk 解析器在最后。 This is my package.json file.这是我的 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"
    }
  }
}

I had to write my own script in package.json and run script instead.我不得不在 package.json 中编写自己的脚本并改为运行脚本。 Referred to this question: Install node-sass on plesk提到这个问题: 在plesk上安装node-sass

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM