New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Followed tutorial but application won't start when entering npm start
-> typescript errors instead
#2611
Comments
@HEYGUL, I just tried it the getting started instructions and it's working fine for me. For your case, it looks like some of the required dependencies are not installed. Could you please run
Then we can compare what was missing. Thanks. |
@dhmlau thank you for your answer.
gave me this output create .mocharc.json
create .npmrc
create .prettierignore
create .prettierrc
create DEVELOPING.md
create README.md
create index.ts
create package.json
create tsconfig.json
create tslint.build.json
create tslint.json
create .vscode/settings.json
create .vscode/tasks.json
create .gitignore
create .dockerignore
create Dockerfile
create index.js
create public/index.html
create src/application.ts
create src/index.ts
create src/migrate.ts
create src/sequence.ts
create src/__tests__/README.md
create src/controllers/README.md
create src/controllers/index.ts
create src/controllers/ping.controller.ts
create src/datasources/README.md
create src/models/README.md
create src/repositories/README.md
create src/__tests__/acceptance/home-page.acceptance.ts
create src/__tests__/acceptance/ping.controller.acceptance.ts
create src/__tests__/acceptance/test-helper.ts
npm WARN deprecated @types/handlebars@4.1.0: This is a stub types definition. handlebars provides its own type definitions, so you do not need this installed.
npm WARN trait-d-union-backend@1.0.0 No license field.
added 682 packages from 1475 contributors and audited 4603 packages in 9.228s
found 2 vulnerabilities (1 low, 1 moderate)
run `npm audit fix` to fix them, or `npm audit` for details
Application trait-d-union-backend was created in trait-d-union-backend.
Next steps:
$ cd trait-d-union-backend
$ npm start I then followed next steps: and I still have the same issue: > trait-d-union-backend@1.0.0 prestart /Users/GUL/Documents/Missions/BetaGouv/trait-d-union-backend
> npm run build
> trait-d-union-backend@1.0.0 build /Users/GUL/Documents/Missions/BetaGouv/trait-d-union-backend
> lb-tsc es2017 --outDir dist
node_modules/@types/node/module.d.ts:2:5 - error TS2300: Duplicate identifier 'mod'.
2 export = NodeJS.Module;
~~~~~~~~~~~~~~~~~~~~~~~
../../../../node_modules/@types/requirejs/index.d.ts:38:11
38 export = mod;
~~~
'mod' was also declared here.
../../../../node_modules/@types/requirejs/index.d.ts:38:11 - error TS2300: Duplicate identifier 'mod'.
38 export = mod;
~~~
node_modules/@types/node/module.d.ts:2:5
2 export = NodeJS.Module;
~~~~~~~~~~~~~~~~~~~~~~~
'mod' was also declared here.
../../../../node_modules/@types/requirejs/index.d.ts:422:13 - error TS2403: Subsequent variable declarations must have the same type. Variable 'require' must be of type 'NodeRequire', but here has type 'Require'.
422 declare var require: Require;
~~~~~~~
Found 3 errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! trait-d-union-backend@1.0.0 build: `lb-tsc es2017 --outDir dist`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the trait-d-union-backend@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/GUL/.npm/_logs/2019-03-19T08_37_14_379Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! trait-d-union-backend@1.0.0 prestart: `npm run build`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the trait-d-union-backend@1.0.0 prestart script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/GUL/.npm/_logs/2019-03-19T08_37_14_424Z-debug.log |
@strongloop/loopback-maintainers, any ideas on why this occurred? I tried with the same Node.js version and Thanks! |
I don't see Did you create the project inside a path that might have |
I will dig to find if any |
Spotted! I did find a Thank you very much for the fast and effective support! |
It doesn't work for me. |
Solution: #2751 (comment) |
Did you check #2611 (comment)? @pSnehanshu What are the exact steps to reproduce the issue? |
@raymondfeng Yes, I checked that comment, not applicable in my case. |
Description
Following official tutorial https://v4.loopback.io/getting-started.html but application won't start when entering
npm start
.Current Behavior
Follow steps to install loopback 4 and create application.
Use all defaults options as is.
When entering
npm start
, build is complaining with following output.Expected Behavior
Follow steps to install loopback 4 and create application.
Use all defaults options as is.
When entering
npm start
, output shows no error and application is launched.The text was updated successfully, but these errors were encountered: