Skip to content

Dependency @nativescript/schematics is added twice #279

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

Closed
d-koppenhagen opened this issue Jun 17, 2020 · 1 comment
Closed

Dependency @nativescript/schematics is added twice #279

d-koppenhagen opened this issue Jun 17, 2020 · 1 comment

Comments

@d-koppenhagen
Copy link
Contributor

Environment
Provide the content of the package.json file in the project:

Describe the bug
Adding the schematics causes a dependency of @nativescript/schematics in both: dependencies and devDependencies but with different versions.
There should't be a direct dependency but a devDependency with the correct version.

"dependencies": {
    ...
    "@nativescript/schematics": "^9.0.0",
    ...
  },
"devDependencies": {
    ...
    "@nativescript/schematics": "~2.0.0",
    ...
}

This should be respected as well by the migration scripts I think @NathanWalker

To Reproduce

  • Open an existing Angular Project (Angular 9.x.x)
  • Exec: ng add @nativescript/schematics --skipAutoGeneratedComponent
  • check your package.json

Expected behavior

The package.json should just contain a single devDependency for @nativescript/schematics within it's version 9.x.x.

This can be accomplished by adding the following to the package.json since Angular 9.0.0 or greater.

"ng-add": {
    "save": "devDependencies"
  },

Manual injections for the dependency and devDependency should be removed, either 2.0.0 and 9.0.0.

@zaccanoy
Copy link

This may be fixed in master, but there isn't a 9.x release on NPM that removes the @angular/http dependency and updates the @nativescript/schematics dependency. Anyone who wishes to create a new shared project has to install the package from the GitHub repository, and even then I was experiencing some issues with the Webpack configuration.

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

No branches or pull requests

3 participants