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

The package "crypto" wasn't found on the file system but is built into node. [plugin angular-browser-node-built-in] #29080

Closed
1 task done
x-etienne opened this issue Dec 7, 2024 · 1 comment

Comments

@x-etienne
Copy link

Command

serve

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

19.0.3

Description

I updated angular cli to 19.0.4 version and my project break

Minimal Reproduction

  • create a new angular project with ng-cli 19.0.4
  • add the npm i @gitbeaker/rest package
  • import it in the app.component.ts
  • start the application with ng start
  • the error arise

my app.components.ts is

import { Component } from '@angular/core';
import { RouterOutlet } from '@angular/router';
import { Gitlab } from '@gitbeaker/rest';

@Component({
  selector: 'app-root',
  imports: [RouterOutlet],
  templateUrl: './app.component.html',
  styleUrl: './app.component.scss'
})
export class AppComponent {
  title = 'nodedeperror';

  testGitpeaker = () => {
    const git = new Gitlab({});
  }

}

Exception or Error

X [ERROR] The package "cluster" wasn't found on the file system but is built into node. [plugin angular-browser-node-built-in]

    node_modules/rate-limiter-flexible/lib/RateLimiterCluster.js:22:24:
      22 │ const cluster = require('cluster');
         ╵                         ~~~~~~~~~

X [ERROR] The package "crypto" wasn't found on the file system but is built into node. [plugin angular-browser-node-built-in]

    node_modules/rate-limiter-flexible/lib/RateLimiterCluster.js:23:23:
      23 │ const crypto = require('crypto');

Your Environment

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


Angular CLI: 19.0.4
Node: 20.13.1
Package Manager: npm 10.2.5
OS: win32 x64

Angular: 19.0.3
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1900.4
@angular-devkit/build-angular   19.0.4
@angular-devkit/core            19.0.4
@angular-devkit/schematics      19.0.4
@angular/cli                    19.0.4
@schematics/angular             19.0.4
rxjs                            7.8.1
typescript                      5.6.3
zone.js                         0.15.0

Anything else relevant?

My package.json is:

{
  "name": "nodedeperror",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "watch": "ng build --watch --configuration development",
    "test": "ng test"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^19.0.0",
    "@angular/common": "^19.0.0",
    "@angular/compiler": "^19.0.0",
    "@angular/core": "^19.0.0",
    "@angular/forms": "^19.0.0",
    "@angular/platform-browser": "^19.0.0",
    "@angular/platform-browser-dynamic": "^19.0.0",
    "@angular/router": "^19.0.0",
    "@gitbeaker/rest": "^41.3.0",
    "rxjs": "~7.8.0",
    "tslib": "^2.3.0",
    "zone.js": "~0.15.0"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^19.0.4",
    "@angular/cli": "^19.0.4",
    "@angular/compiler-cli": "^19.0.0",
    "@types/jasmine": "~5.1.0",
    "jasmine-core": "~5.4.0",
    "karma": "~6.4.0",
    "karma-chrome-launcher": "~3.2.0",
    "karma-coverage": "~2.2.0",
    "karma-jasmine": "~5.1.0",
    "karma-jasmine-html-reporter": "~2.1.0",
    "typescript": "~5.6.2"
  }
}
@alan-agius4
Copy link
Collaborator

Duplicate of #29077

@alan-agius4 alan-agius4 marked this as a duplicate of #29077 Dec 7, 2024
@alan-agius4 alan-agius4 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 7, 2024
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

2 participants