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

[Bug]: After using --exact-o3r-version with npm create @o3r, ng g library fails if --exact-o3r-version is not explicitly specified again #2758

Open
divdavem opened this issue Jan 29, 2025 · 0 comments · May be fixed by #2769
Assignees
Labels
bug Something isn't working priority:medium

Comments

@divdavem
Copy link
Member

divdavem commented Jan 29, 2025

Package name

workspace

Package version

11.5.6

Reproduction steps

npm create @o3r myproject -- --exact-o3r-version
cd myproject
npx ng g library

Current result

$ npx ng g library
? Name of the package of the new module? mylib
    No TsConfig file found at 
CREATE libs/mylib/README.md (978 bytes)
CREATE libs/mylib/ng-package.json (181 bytes)
CREATE libs/mylib/package.json (1059 bytes)
CREATE libs/mylib/tsconfig.lib.json (329 bytes)
CREATE libs/mylib/tsconfig.lib.prod.json (401 bytes)
CREATE libs/mylib/tsconfig.spec.json (277 bytes)
CREATE libs/mylib/src/public-api.ts (115 bytes)
CREATE libs/mylib/src/lib/mylib.component.spec.ts (585 bytes)
CREATE libs/mylib/src/lib/mylib.component.ts (221 bytes)
CREATE libs/mylib/src/lib/mylib.service.spec.ts (352 bytes)
CREATE libs/mylib/src/lib/mylib.service.ts (134 bytes)
CREATE libs/mylib/.gitignore (13 bytes)
CREATE libs/mylib/.npmignore (0 bytes)
CREATE libs/mylib/jest.config.js (1095 bytes)
CREATE libs/mylib/tsconfig.builders.json (437 bytes)
CREATE libs/mylib/tsconfig.json (185 bytes)
CREATE libs/mylib/testing/setup-jest.ts (42 bytes)
UPDATE angular.json (1334 bytes)
UPDATE package.json (1646 bytes)
UPDATE tsconfig.json (903 bytes)
⠹ Installing packages (npm)...npm error code EOVERRIDE
npm error Override for @o3r/core@~11.5.6 conflicts with direct dependency
npm error A complete log of this run can be found in: ~/.npm/_logs/2025-01-29T16_49_47_102Z-debug-0.log
✖ Package install failed, see above.

Expected result

$ npx ng g library
? Name of the package of the new module? mylib
    No TsConfig file found at 
CREATE libs/mylib/README.md (978 bytes)
CREATE libs/mylib/ng-package.json (181 bytes)
CREATE libs/mylib/package.json (1058 bytes)
CREATE libs/mylib/tsconfig.lib.json (329 bytes)
CREATE libs/mylib/tsconfig.lib.prod.json (401 bytes)
CREATE libs/mylib/tsconfig.spec.json (277 bytes)
CREATE libs/mylib/src/public-api.ts (115 bytes)
CREATE libs/mylib/src/lib/mylib.component.spec.ts (585 bytes)
CREATE libs/mylib/src/lib/mylib.component.ts (221 bytes)
CREATE libs/mylib/src/lib/mylib.service.spec.ts (352 bytes)
CREATE libs/mylib/src/lib/mylib.service.ts (134 bytes)
CREATE libs/mylib/.gitignore (13 bytes)
CREATE libs/mylib/.npmignore (0 bytes)
CREATE libs/mylib/jest.config.js (1095 bytes)
CREATE libs/mylib/tsconfig.builders.json (437 bytes)
CREATE libs/mylib/tsconfig.json (185 bytes)
CREATE libs/mylib/testing/setup-jest.ts (42 bytes)
UPDATE angular.json (1334 bytes)
UPDATE package.json (1645 bytes)
UPDATE tsconfig.json (903 bytes)
✔ Packages installed successfully.
? Which preset to use to start your application? BASIC - Minimum plugin list to install for a basic Otter application. (details on 
https://www.npmjs.com/package/@o3r/core#preset-basic)
    ESLint package not installed. Skipping Otter linter phase!
    You can add Otter linter config rules later to the project via this command: ng add @o3r/eslint-config-otter
     Project "mylib" has a "projectType" of "library".
UPDATE angular.json (1772 bytes)
UPDATE tsconfig.json (855 bytes)
UPDATE package.json (1795 bytes)
UPDATE libs/mylib/package.json (1256 bytes)
✔ Packages installed successfully.
UPDATE package.json (1820 bytes)
UPDATE libs/mylib/package.json (1372 bytes)
✔ Packages installed successfully.
CREATE libs/mylib/collection.json (364 bytes)
CREATE libs/mylib/schematics/ng-add/index.ts (2481 bytes)
CREATE libs/mylib/schematics/ng-add/schema.json (615 bytes)
CREATE libs/mylib/schematics/ng-add/schema.ts (309 bytes)
UPDATE libs/mylib/package.json (1949 bytes)
UPDATE libs/mylib/tsconfig.builders.json (412 bytes)
✔ Packages installed successfully.

Additional comments

When creating a workspace using --exact-o3r-version, shouldn't this flag be remembered for all future o3r package installation?

@divdavem divdavem added bug Something isn't working triage labels Jan 29, 2025
@matthieu-crouzet matthieu-crouzet self-assigned this Jan 30, 2025
matthieu-crouzet added a commit that referenced this issue Jan 30, 2025
matthieu-crouzet added a commit that referenced this issue Jan 31, 2025
matthieu-crouzet added a commit that referenced this issue Jan 31, 2025
matthieu-crouzet added a commit that referenced this issue Jan 31, 2025
matthieu-crouzet added a commit that referenced this issue Jan 31, 2025
matthieu-crouzet added a commit that referenced this issue Feb 4, 2025
matthieu-crouzet added a commit that referenced this issue Feb 4, 2025
matthieu-crouzet added a commit that referenced this issue Feb 5, 2025
matthieu-crouzet added a commit that referenced this issue Feb 5, 2025
matthieu-crouzet added a commit that referenced this issue Feb 5, 2025
matthieu-crouzet added a commit that referenced this issue Feb 5, 2025
matthieu-crouzet added a commit that referenced this issue Feb 6, 2025
matthieu-crouzet added a commit that referenced this issue Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:medium
Projects
None yet
3 participants