ngx-mqtt: ngx-mqtt installation fails

  • I have searched for similar issues in this repository, but couldn’t find one.
  • I have read the README and have a basic understanding how angular works.

I’m submitting a…

  • Regression (a behavior that used to work and stopped working in a new release)
  • Bug report  
  • Feature request

Current behavior

It is not possible to install ngx-mqtt with the command npm install --save ngx-mqtt.


> ngx-mqtt@7.0.14 postinstall /home/fabrizio/developing/projects/sample-project/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/fabrizio/developing/projects/sample-project/node_modules/ngx-mqtt/postinstall.js:11
    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'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '../../node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/browser.js'
}
npm WARN icss-utils@5.0.0 requires a peer of postcss@^8.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN postcss-modules-extract-imports@3.0.0 requires a peer of postcss@^8.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN postcss-modules-local-by-default@4.0.0 requires a peer of postcss@^8.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN postcss-modules-scope@3.0.0 requires a peer of postcss@^8.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN postcss-modules-values@4.0.0 requires a peer of postcss@^8.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN ngx-mqtt@7.0.14 requires a peer of @angular/common@^9.1.12 but none is installed. You must install peer dependencies yourself.
npm WARN ngx-mqtt@7.0.14 requires a peer of @angular/core@^9.1.12 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/webpack-dev-server/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ngx-mqtt@7.0.14 postinstall: `node postinstall`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ngx-mqtt@7.0.14 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/fabrizio/.npm/_logs/2020-11-15T14_34_31_822Z-debug.log

Expected behavior

The installation should complete without issues.

Minimal working example of the problem with instructions

A minimal working example can be build by following these steps:

ng new sample-project
cd sample-project
npm install --save ngx-mqtt

Environment

os: Linux Manjaro
ngx-mqtt version: 7.0.14

Output from ng --version

Angular CLI: 11.0.1
Node: 14.13.1
OS: linux x64

Angular: 11.0.0
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1100.1
@angular-devkit/build-angular   0.1100.1
@angular-devkit/core            11.0.1
@angular-devkit/schematics      11.0.1
@angular/cli                    11.0.1
@schematics/angular             11.0.1
@schematics/update              0.1100.1
rxjs                            6.6.3
typescript                      4.0.5

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 43 (11 by maintainers)

Commits related to this issue

Most upvoted comments

The angular dev team moved @angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/browser.js to @angular-devkit/build-angular/src/webpack/configs/browser.js. It seems to work now in ngx-mqtt@8.0.1 can you confirm this @dexpota?

@johnlewiskalahari you think this is not a good library, because the angular team introduced breaking changes, and I’m not fixing this fast enough? Remember this is a spare time project, not company backed and first and foremost not a project I get paid for. So maybe you should reconsider your expectation regarding anything you get for free.

Sorry, (paid)work and personal life are quite demanding these times. I’ll see what I can do in the near future.

Installing a previous version seems to work npm i --save ngx-mqtt@7.0.9