ngx-rocket / generator-ngx-rocket

:rocket: Extensible Angular 14+ enterprise-grade project generator
https://ngx-rocket.github.io/
MIT License
1.53k stars 217 forks source link

Error, package.json not found using --packageManager option #532

Closed foxMclion closed 4 years ago

foxMclion commented 4 years ago

I'm submitting a...

Current behavior

Steps to reproduce: Create and enter an empty folder, then run

$ ngx new --packageManager yarn

Error, package.json not found

If I try and do a yarn init, and execute ngx create command afterwards it still doesn't work:

$ yarn init                              
yarn init v1.22.4
question name (ngx-rocket-test): 
question version (1.0.0): 
question description: 
question entry point (index.js): 
question repository url: 
question author (user <edited>): 
question license (MIT): 
question private: 
success Saved package.json
✨  Done in 10.76s.

~/ngx-rocket-test master* 11s
$ ngx new --packageManager yarn
No script match for --packageManager

No scripts found in your package.json file

Expected behavior

A new app is generated and uses yarn to install packages

Environment


ngX-Rocket: 7.1.0
Node.js: v13.7.0
Npm: 6.14.2
OS: linux x64 5.3.0-42-generic

Generated project options:
{
  "generator-ngx-rocket": {
    "version": "7.1.0",
    "props": {
      "location": "path",
      "strict": false,
      "skipInstall": false,
      "skipQuickstart": false,
      "initGit": true,
      "appName": "ngx rocket test",
      "target": [
        "web"
      ],
      "pwa": true,
      "ui": "bootstrap",
      "auth": false,
      "lazy": true,
      "angulartics": false,
      "tools": [
        "prettier",
        "hads"
      ],
      "utility": [],
      "projectName": "ngx-rocket-test",
      "packageManager": "npm",
      "mobile": [],
      "desktop": []
    }
  }
}

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

Angular CLI: 9.0.7
Node: 13.7.0
OS: linux x64

Angular: 
... 
Ivy Workspace: 

Package                      Version
------------------------------------------------------
@angular-devkit/architect    
@angular-devkit/core         
@angular-devkit/schematics   
@schematics/angular          
@schematics/update           

Others: