minh nhat Nhan
minh nhat Nhan

Reputation: 59

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

I am trying to install ng-mqtt, but I keep getting that error for the post-install.

I tried to run "npm install --save-dev @angular-devkit/build-angular" I wonder how can i get this file ( '../../node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/browser.js')

here in the output when I run npm I ngx-mqtt


> [email protected] postinstall /home/duma/Documents/Alala/SmartHome/node_modules/ngx-mqtt
> node postinstall

{ [Error: ENOENT: no such file or directory, open '../../node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/browser.js']
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path:
   '../../node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/browser.js' }
/home/duma/Documents/Alala/SmartHome/node_modules/ngx-mqtt/postinstall.js:33
    throw err;
    ^

Error: ENOENT: no such file or directory, open '../../node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/browser.js'
npm WARN @angular-devkit/[email protected] requires a peer of typescript@~4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of typescript@>=4.0 <4.1 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of @angular/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN @ngtools/[email protected] requires a peer of typescript@~4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of [email protected] - 3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of popper.js@^1.16.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/compiler@>=2.3.1 <10.0.0 || >9.0.0-beta <10.0.0 || >9.1.0-beta <10.0.0 || >9.2.0-beta <10.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/common@>=11.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/core@>=11.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/watchpack-chokidar2/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/webpack-dev-server/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node postinstall`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/duma/.npm/_logs/2021-01-15T20_01_23_708Z-debug.log

Upvotes: 2

Views: 2603

Answers (1)

Pablo Da Silva Sena
Pablo Da Silva Sena

Reputation: 31

Hello I had an problem just like yours and this solved it for me.

npm install git+https://github.com/angular/angular-devkit-build-angular-builds.git

Hope it helps you too :)

Upvotes: 2

Related Questions