Heroku中的Loopback 4部署,未找到lb-tsc错误

问题描述 投票:1回答:1

我正在尝试将loopback 4应用程序部署到heroku。但是发布后,npm-start命令在heroku控制台中不起作用。其抛出sh:1:磅tsc找不到。package.json如下

"devDependencies": {
"@loopback/build": "^3.0.0",
"@loopback/eslint-config": "^5.0.0",
"@loopback/testlab": "^1.10.0",
"@types/node": "^10.17.6",
"@typescript-eslint/eslint-plugin": "^2.10.0",
"@typescript-eslint/parser": "^2.10.0",
"eslint": "^6.7.2",
"eslint-config-prettier": "^6.7.0",
"eslint-plugin-eslint-plugin": "^2.1.0",
"eslint-plugin-mocha": "^6.2.2",
"source-map-support": "^0.5.16",
"typescript": "~3.7.3"},
"scripts": {
    "build": "lb-tsc",
    "build:watch": "lb-tsc --watch",
    "clean": "lb-clean dist *.tsbuildinfo",
     .......
    "lb-tsc": "lb-tsc",
    "postinstall": "npm run lb-tsc"
  }
node.js typescript strongloop loopback4
1个回答
0
投票

尝试在命令行中安装它:npm i -g @loopback/cli npm i -g @loopback/build

我正在MacOS的命令行中使用它。

© www.soinside.com 2019 - 2024. All rights reserved.