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

ng-package.prod.json does not exist. #755

Closed
xmlking opened this issue Sep 6, 2018 · 13 comments
Closed

ng-package.prod.json does not exist. #755

xmlking opened this issue Sep 6, 2018 · 13 comments

Comments

@xmlking
Copy link
Contributor

xmlking commented Sep 6, 2018

getting following error after upgrading dependency versions

$ ng g lib test123 --prefix=ngx --tags=core-module --unit-test-runner=jest --dry-run
Path "/libs/test123/ng-package.prod.json" does not exist.

Env

 ./node_modules/.bin/nx --version
6.3.0
$ ng -v

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 6.2.0
Node: 10.7.0
OS: darwin x64
Angular: 6.1.7
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router, service-worker

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.8.0
@angular-devkit/build-angular      0.8.0
@angular-devkit/build-ng-packagr   0.8.0
@angular-devkit/build-optimizer    0.8.0
@angular-devkit/build-webpack      0.8.0
@angular-devkit/core               0.8.0
@angular-devkit/schematics         0.8.0
@angular/cdk                       7.0.0-beta.0
@angular/cdk-experimental          7.0.0-beta.0
@angular/cli                       6.2.0
@angular/flex-layout               6.0.0-beta.18
@angular/material                  7.0.0-beta.0
@angular/material-moment-adapter   7.0.0-beta.0
@angular/pwa                       0.8.0
@ngtools/json-schema               1.1.0
@ngtools/webpack                   6.2.0
@schematics/angular                0.8.0
@schematics/update                 0.8.0
ng-packagr                         4.1.1
rxjs                               6.3.2
typescript                         2.9.2
webpack                            4.17.2

xmlking added a commit to xmlking/ngx-starter-kit that referenced this issue Sep 6, 2018
@FrozenPandaz
Copy link
Collaborator

@angular/[email protected] does not create that file after the following commit.

angular/angular-cli@50fc721#diff-3f5a004da522f21de55038cb2501a3ad

Our schematics will have to be updated once we update to @angular/[email protected].

We will update to be compatible with @angular/[email protected] ASAP. For now, stay on @angular/cli@~6.1.0

@FrozenPandaz FrozenPandaz self-assigned this Sep 10, 2018
@maxigimenez
Copy link
Contributor

Any update on this?

@FrozenPandaz
Copy link
Collaborator

Update after briefly spiking upgrading to CLI 6.2:

@angular/[email protected] has a breaking change (orthogonal to this) which they are reverting. The next version of @angular/cli should revert the breaking change. After that, we should 🤞 be able to provide a CLI 6.2 compatible version of nx! :)

@FrozenPandaz
Copy link
Collaborator

@nrwl/[email protected] brings in Angular CLI 6.2 so this issue should be fixed with #783

@IlCallo
Copy link

IlCallo commented Oct 22, 2018

@FrozenPandaz with Angular CLI 6.2.3 and NX 6.4.0 I still get this error

@maxigimenez
Copy link
Contributor

Works for me, thanks a lot!

@listepo-alterpost
Copy link
Contributor

@IlCallo are you using the correct schematics?

@IlCallo
Copy link

IlCallo commented Oct 23, 2018

This is the command I'm using: ng generate lib libName

I don't really know which are the 'correct schematics', this are my full Angular dependencies as outputted by ng -v


     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 6.2.3
Node: 9.3.0
OS: win32 x64
Angular: 6.1.9
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router, service-worker

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.8.3
@angular-devkit/build-angular      0.8.3
@angular-devkit/build-ng-packagr   0.8.3
@angular-devkit/build-optimizer    0.8.3
@angular-devkit/build-webpack      0.8.3
@angular-devkit/core               0.8.3
@angular-devkit/schematics         0.8.3
@angular/cdk                       6.4.7
@angular/cdk-experimental          6.4.7
@angular/cli                       6.2.3
@angular/material                  6.4.7
@angular/material-moment-adapter   6.4.7
@angular/pwa                       0.8.3
@ngtools/json-schema               1.1.0
@ngtools/webpack                   6.2.3
@schematics/angular                0.8.3
@schematics/update                 0.8.3
ng-packagr                         4.1.1
rxjs                               6.3.3
typescript                         2.9.2
webpack                            4.19.0

@listepo-alterpost
Copy link
Contributor

@IlCallo in the angular.json should be

  "cli": {
    "defaultCollection": "@nrwl/schematics"
  }

do you have the same?

@IlCallo
Copy link

IlCallo commented Oct 23, 2018

Yes, this is what I have there

"cli": {
    "packageManager": "yarn",
    "warnings": {
      "typescriptMismatch": false,
      "versionMismatch": false
    },
    "defaultCollection": "@nrwl/schematics"
  },

@IlCallo
Copy link

IlCallo commented Oct 25, 2018

My bad, I upgraded global NX but ng command refers to the local installation instead, that was causing the issue.
Ty anyway <3

@jafsparrow
Copy link

anybody has a working repo which doesn't have this error. could you please post the package.json versions.. I am stuck with this error. not sure what versions that the cli and nx to be updated.

xmlking added a commit to xmlking/ngx-starter-kit that referenced this issue Mar 6, 2019
@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants