ngx-rocket / generator-ngx-rocket

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

ngx update failed #620

Closed Paul75 closed 2 years ago

Paul75 commented 2 years ago

I'm submitting a...

Current behavior

ngx update get errors :

ngx update

(node:3443) UnhandledPromiseRejectionWarning: TypeError: Use delete() to clear values at Conf.set (/usr/local/lib/node_modules/generator-ngx-rocket/node_modules/conf/dist/source/index.js:165:19) at Insight.set optOut [as optOut] (/usr/local/lib/node_modules/generator-ngx-rocket/node_modules/insight/lib/index.js:56:15) at Object.initializing (/usr/local/lib/node_modules/generator-ngx-rocket/generators/app/index.js:57:25) at Object. (/usr/local/lib/node_modules/generator-ngx-rocket/node_modules/yeoman-generator/lib/index.js:1024:25) at /usr/local/lib/node_modules/generator-ngx-rocket/node_modules/run-async/index.js:49:25 at new Promise () at /usr/local/lib/node_modules/generator-ngx-rocket/node_modules/run-async/index.js:26:19 at runLoop.add.once.once (/usr/local/lib/node_modules/generator-ngx-rocket/node_modules/yeoman-generator/lib/index.js:1025:11) at Immediate. (/usr/local/lib/node_modules/generator-ngx-rocket/node_modules/grouped-queue/lib/subqueue.js:48:34) at processImmediate (internal/timers.js:464:21) (Use node --trace-warnings ... to show where the warning was created) (node:3443) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:3443) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Expected behavior

ngx update get errors

Minimal reproduction of the problem with instructions

do : ngx update

Environment



ngX-Rocket: 10.1.1
Node.js: v14.18.1
Npm: 8.3.0
OS: linux x64 5.4.0-91-generic

Generated project options:
{
  "generator-ngx-rocket": {
    "version": "4.2.0",
    "props": {
      "appName": "CROUS de Versailles",
      "target": [
        "web"
      ],
      "pwa": true,
      "ui": "bootstrap",
      "auth": true,
      "lazy": false,
      "projectName": "crous-de-versailles",
      "packageManager": "yarn",
      "mobile": [],
      "angulartics": false
    }
  }
}

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

Angular CLI: 1.7.4
Node: 14.18.1
OS: linux x64
Angular: 5.2.11
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router, service-worker

@angular/cli: 1.7.4
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 7.3.10
@angular-devkit/schematics: 7.3.10
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.2
@schematics/angular: 8.3.29
@schematics/package-update: 0.3.2
typescript: 2.6.2
webpack: 3.11.0

Others:

Ruslancic commented 2 years ago

Same thing! I have this error when trying to generate new project with

ngx new

sinedied commented 2 years ago

Yarn seems to cause many errors lately with packages incorrectly installed, causing issues like this one.

You should be able to bypass this one by adding the flag --no-insights, but if generator-ngx-rocket is installed with npm and not yarn, this issues doesn't seems to occur at all.

Ruslancic commented 2 years ago

I'm using npm, and just trying ngx new with some flag, and error disapear!

Running

ngx new --no-insights --no-analytics

, error is gone...

ci-rebot commented 2 years ago

:tada: This issue has been resolved in version 10.1.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: