Angular-devkit error while installing ngx-mqtt

258 views Asked by At

I'm trying to install mqtt in Angular project using npm i ngx-mqtt but I got below error related to angular-devkit. I'm already using "@angular-devkit/build-angular": "^0.803.24" and it is installed and I'm using Angular 8.

[Error: ENOENT: no such file or directory, open '**PATH**\node_modules\@angular-devkit\build-angular\src\webpack\configs\browser.js'] {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'open',
  path: 'PATH\\node_modules\\@angular-devkit\\build-angular\\src\\webpack\\configs\\browser.js'
}
**PATH**\node_modules\ngx-mqtt\postinstall.js:12
    throw err;
    ^

[Error: ENOENT: no such file or directory, open '**PATH**\node_modules\@angular-devkit\build-angular\src\webpack\configs\browser.js'] {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'open',
  path: '**PATH**\\node_modules\\@angular-devkit\\build-angular\\src\\webpack\\configs\\browser.js'
}

Any ideas?

1

There are 1 answers

0
elmor34 On

I have same problem in Angular 9.1.12 Ionic 5.2.2

But ** no problem on :** Angular 10.0.14, Ionic 5.5.0

npm i --save ngx-mqtt

> [email protected] postinstall /Users/gokhan/bitBucket/site/node_modules/ngx-mqtt
> node postinstall

{ [Error: ENOENT: no such file or directory, open '../../node_modules/@angular-devkit/build-angular/src/webpack/configs/browser.js']
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path:
   '../../node_modules/@angular-devkit/build-angular/src/webpack/configs/browser.js' }
/Users/gokhan/bitBucket/site/node_modules/ngx-mqtt/postinstall.js:12
    throw err;
    ^

Error: ENOENT: no such file or directory, open '../../node_modules/@angular-devkit/build-angular/src/webpack/configs/browser.js'