Reputation: 351
When I try to build a Loopback 4 application with npm run build
on Ubuntu 16.04, npm runs lb-tsc
for 3 seconds and then just stops without printing any message. After it stops a tsconfig.tsbuildinfo
file is generated but the dist
folder is not.
My tsconfig.json is like the following:
{
"$schema": "http://json.schemastore.org/tsconfig",
"extends": "@loopback/build/config/tsconfig.common.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src"
},
"include": ["src"]
}
I also tried running npm run build:watch
, npm run clean
, and running all of these with sudo and still no luck. Any idea what's causing this?
Upvotes: 2
Views: 2388
Reputation: 91
Just remove tsconfig.tsbuildinfo and relaunch the command
npm run build
Upvotes: 0
Reputation: 351
Turns out the build files are actually generated but lb4 cli produces settings.json in .vscode folder which configures VS code to exclude the dist folder from project workspace by default.
Upvotes: 2
Reputation: 1585
Please try the following debugging steps:
Update to the latest Node.js LTS version (at the time of writing: v12.18.1)
Delete node_modules
Run lb4 update
^ Note: This will update the dependencies, which may contain breaking changes. Keep a backup of package.json
Run npm install
Run npm run clean
Run npm start
Be sure to run the commands in the root directory of the project (where package.json
is present).
Upvotes: 1