Skip to content
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

Update Getting-started.md add "npm install" comando line in the "starting the project" item. #10740

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marciodearaujo
Copy link

When trying to run the tutorial following the tutorial I identified the lack of the "npm install" command in the "starting the project" item. This causes an error when running the “npm start” command.

Checklist

  • DCO (Developer Certificate of Origin) signed in all commits
  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Documentation in /docs/site was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in examples/* were updated

👉 Check out how to submit a PR 👈

When trying to run getting started following the tutorial I identified the lack of the "npm install" command to install the modules. This caused an error when executing the "npm start" command.

Signed-off-by: Márcio de Araújo Bastos <[email protected]>
Copy link
Member

@achrinza achrinza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

By default, the lb4 [app] command will always run npm install for the user after the prompts. The exception is if the user added the --skip-install flag.

Hence, manually executing npm install is not necessary.

Did a quick test with the latest lb4 CLI in this repo and confirmed that it does auto-install dependencies:

LB4 CLI command logs
$ npm exec --no --package='@loopback/cli' -- lb4 app
? Project name: foooo) 
? Project description: fooo)
? Project root directory: fooo) 
? Application class name: FooApplicationn) 
? Select features to enable in the project Enable eslint, Enable prettier, Enable mocha, Enable loopbackBuild, Enable vscode, Enable docker, Enable repositories, Enable services
? Yarn is available. Do you prefer to use it by default? No/N)
    force foo/.yo-rc.json
   create foo/.eslintignorecha to run tes
   create foo/.eslintrc.jsse @loopback/bu
   create foo/.mocharc.jsone config files 
   create foo/.npmrcclude Dockerfile and 
   create foo/.prettierignorede repositor
   create foo/.prettierrcal more choices)
   create foo/DEVELOPING.md
   create foo/package.json
   create foo/tsconfig.json
   create foo/.vscode/launch.json
   create foo/.vscode/settings.json
   create foo/.vscode/tasks.json 
   create foo/.gitignore
   create foo/.dockerignore
   create foo/Dockerfile
   create foo/README.md
   create foo/public/index.html
   create foo/src/application.ts
   create foo/src/index.ts
   create foo/src/migrate.ts
   create foo/src/openapi-spec.ts
   create foo/src/sequence.ts
   create foo/src/__tests__/README.md 
   create foo/src/controllers/README.md
   create foo/src/controllers/index.ts
   create foo/src/controllers/ping.controller.ts
   create foo/src/datasources/README.md
   create foo/src/models/README.md
   create foo/src/repositories/README.md
   create foo/src/__tests__/acceptance/home-page.acceptance.ts
   create foo/src/__tests__/acceptance/ping.controller.acceptance.ts
   create foo/src/__tests__/acceptance/test-helper.ts

No change to package.json was detected. No package manager install will be executed.
npm warn config cache-min This option has been deprecated in favor of `--prefer-offline`.
 npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key
 value, which is much more comprehensive and powerful.
 npm warn deprecated @humanwhocodes/[email protected]: Use @eslint/object-schema instead
 npm warn deprecated @humanwhocodes/[email protected]: Use @eslint/config-array instead
 npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
 npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
 npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
 npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
 npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
 npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
 npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
 npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
 npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
 npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
 npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
 npm warn deprecated [email protected]: This version is no longer supported. Please see https://eslint.org/version-support for other options.
 
added 639 packages, and audited 640 packages in 2m
 
 106 packages are looking for funding
   run `npm fund` for details
 
found 0 vulnerabilities

Could you double-confirm if this is the case for you as well? If not, please feel free to open a bug report with details so that we can try to replicate the issue.

@marciodearaujo
Copy link
Author

marciodearaujo commented Nov 14, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants