Open Ismail-dev opened 2 years ago
I can confirm it's not only windows issue. I have the same bug on macOS.
@Ismail-dev i think the issue caused by node version. I have reinstalled node to node 16 using nvm and everything works fine.
@kpostekk Yes, looks like it works with node 16 with some errors logged
@Ismail-dev, I was also having issue to create a LB4 app using Node.js 17.x, but was working fine with Node.js 16.x.
Regarding the "could not resolve dependency" issue, if you run npm install
in the newly created project, would it work? I also found https://stackoverflow.com/questions/64573177/unable-to-resolve-dependency-tree-error-when-installing-npm-packages, it suggests to run npm install --legacy-peer-deps
. Hope it helps.
Still running into this issue:
MacOS 12.4
node: v18.9.0 (npm v9.1.2)
Ran command: lb4 app
Stacktrace (same error with all features enabled):
? Select features to enable in the project Enable mocha, Enable loopbackBuild, Enable docker, Enable repositories, Enable services
? Yarn is available. Do you prefer to use it by default? No
force todo-list/.yo-rc.json
create todo-list/.mocharc.json
create todo-list/DEVELOPING.md
create todo-list/package.json
create todo-list/tsconfig.json
create todo-list/.gitignore
create todo-list/.dockerignore
create todo-list/Dockerfile
create todo-list/README.md
create todo-list/public/index.html
create todo-list/src/application.ts
create todo-list/src/index.ts
create todo-list/src/migrate.ts
create todo-list/src/openapi-spec.ts
create todo-list/src/sequence.ts
create todo-list/src/__tests__/README.md
create todo-list/src/controllers/README.md
create todo-list/src/controllers/index.ts
create todo-list/src/controllers/ping.controller.ts
create todo-list/src/datasources/README.md
create todo-list/src/models/README.md
create todo-list/src/repositories/README.md
create todo-list/src/__tests__/acceptance/home-page.acceptance.ts
create todo-list/src/__tests__/acceptance/ping.controller.acceptance.ts
create todo-list/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 ERESOLVE overriding peer dependency
npm WARN While resolving: @loopback/eslint-config@13.0.6
npm WARN Found: eslint@undefined
npm WARN node_modules/eslint
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer eslint@"^8.28.0" from @loopback/eslint-config@13.0.6
npm WARN node_modules/@loopback/eslint-config
npm WARN @loopback/eslint-config@"^13.0.6" from @loopback/build@9.0.6
npm WARN node_modules/@loopback/build
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @types/node@^14.18.34.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/kayra/.npm/_logs/2022-12-22T00_43_38_066Z-debug-0.log
Using node v16 didn't work for me.
Running npm install --legacy-peer-deps
in the project after creation did work for me.
Describe the bug
As a developer I want to quickly scaffold an application. For this I'm using getting started docs https://loopback.io/doc/en/lb4/Getting-started.html
Installed node.js version 17.3.1 and loopback4 cli too npm i -g @loopback/cli
When I run the lb4 app command and provide the details in the CLI, the application scaffolding fails. Tried with all features, no features and selected features too. Didn't worked.
By features I mean![image](https://user-images.githubusercontent.com/36616825/149937978-b4bb657f-55f5-4df6-a910-5da41837faa7.png)
CLI used are gitbash, windows CMD, vscode Terminal [ did not worked in any of the CLI too]
Logs
Additional information
With all features selected![image](https://user-images.githubusercontent.com/36616825/149938542-e611b589-a4cc-4b97-ad23-8d631f3bed43.png)
With selected features![image](https://user-images.githubusercontent.com/36616825/149938645-5dac9bf3-27a5-47ad-863c-4afa5f5efe79.png)
Without any features![image](https://user-images.githubusercontent.com/36616825/149938755-eb684466-2385-46f1-b65d-bc547b3eb8e1.png)
Reproduction
open a cli and follow the steps on a windows 10 machine Install node.js then Install LoopBack 4 CLI run lb4 app command