Loopback: Error during install

Created on 5 Sep 2016  ·  17Comments  ·  Source: strongloop/loopback

Hi, Guys!
When I run in console
$ npm install -g strongloop
I get following error message:

npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

[email protected] preinstall /usr/local/lib/node_modules/.staging/strong-arc-bd25cce4
node .sl-blip.js

/usr/local/bin/slc -> /usr/local/lib/node_modules/strongloop/bin/slc.js
/usr/local/lib
└── (empty)

npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/Cellar/node/0.12.5/bin/node" "/usr/local/bin/npm" "install" "-g" "strongloop"
npm ERR! node v6.4.0
npm ERR! npm v3.10.3
npm ERR! path /usr/local/lib/node_modules/strongloop/node_modules/loopback-sdk-angular-cli/bin/lb-ng
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/strongloop/node_modules/loopback-sdk-angular-cli/bin/lb-ng'
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/strongloop/node_modules/loopback-sdk-angular-cli/bin/lb-ng'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR! /Users/mainagri/work/insurance_guide/server/npm-debug.log
npm ERR! code 1

Could you identify where is the problem?

bug major

Most helpful comment

+1 Same error too.

All 17 comments

+1 I'm having the exact same error.

I'm having the issue as well. It appears that the release of loopback-sdk-angular-cli renamed lb-ng to lb-ng.js. PR incoming soon.

+1 I have the same error with node v4 and v6
tested on osx el capitan and windows 10

+1 on Heroku
+1 on osx

+1, I have the same error, but I actually tested on several node & npm versions, since I'm using docker. In every installation got the same error.

+1 Same error too.

+1 Ubuntu 16.04

+1 sierra macOS, [email protected] and [email protected]

FWIW: If I downgrade to [email protected] and keep [email protected] I do not see this problem any more.

@tamitutor: are you talking about https://github.com/strongloop/strong-pm/issues/295? What are you logs? You are probably seeing a different issue than this one.

+1 Ubuntu 16.04 node v6.7.0 npm v3.10.8

124546 silly build [email protected]
124547 info linkStuff [email protected]
124548 silly linkStuff [email protected] has /usr/lib/node_modules as its parent node_modules
124549 silly linkStuff [email protected] is part of a global install
124550 silly linkStuff [email protected] is installed into a global node_modules
124551 silly linkStuff [email protected] is installed into the top-level global node_modules
124552 verbose linkBins [email protected]
124553 verbose link bins [ { slc: './bin/slc.js',
124553 verbose link bins 'lb-ng': './node_modules/loopback-sdk-angular-cli/bin/lb-ng.js' },
124553 verbose link bins '/usr/bin',
124553 verbose link bins true ]
124554 verbose linkMans [email protected]
124555 silly gentlyRm /usr/bin/lb-ng is being gently removed
124556 silly gentlyRm parent.path = /usr
124557 silly gentlyRm parent.managed = /usr is in /usr
124558 silly gentlyRm target.path = /usr/bin/lb-ng
124559 silly gentlyRm target.symlink = ../lib/node_modules/strongloop/node_modules/loopback-sdk-angular-cli/bin/lb-ng
124560 silly gentlyRm target.managed = false
124561 silly gentlyRm target.inParent = false
124562 verbose unlock done using /home/ysr/.npm/_locks/staging-a072192f34a17023.lock for /usr/lib/node_modules/.staging
124563 silly rollbackFailedOptional Starting
124564 silly rollbackFailedOptional Finishing
124565 silly runTopLevelLifecycles Finishing
124566 silly install printInstalled
124567 verbose stack Error: Refusing to delete /usr/bin/lb-ng: ../lib/node_modules/strongloop/node_modules/loopback-sdk-angular-cli/bin/lb-ng symlink target is not controlled by npm /usr
124567 verbose stack at clobberFail (/usr/lib/node_modules/npm/lib/utils/gently-rm.js:162:12)
124567 verbose stack at isSafeToRm (/usr/lib/node_modules/npm/lib/utils/gently-rm.js:152:15)
124567 verbose stack at /usr/lib/node_modules/npm/lib/utils/gently-rm.js:93:5
124567 verbose stack at LOOP (/usr/lib/node_modules/npm/node_modules/slide/lib/chain.js:7:26)
124567 verbose stack at /usr/lib/node_modules/npm/node_modules/slide/lib/chain.js:18:7
124567 verbose stack at /usr/lib/node_modules/npm/lib/utils/gently-rm.js:179:14
124567 verbose stack at /usr/lib/node_modules/npm/node_modules/iferr/index.js:11:16
124567 verbose stack at /usr/lib/node_modules/npm/node_modules/iferr/index.js:11:16
124567 verbose stack at /usr/lib/node_modules/npm/node_modules/iferr/index.js:11:16
124567 verbose stack at /usr/lib/node_modules/npm/node_modules/iferr/index.js:11:16
124568 verbose cwd /home/ysr
124569 error Linux 4.4.0-38-generic
124570 error argv "/usr/bin/nodejs" "/usr/bin/npm" "-g" "install" "strongloop"
124571 error node v6.7.0
124572 error npm v3.10.8
124573 error path /usr/bin/lb-ng
124574 error code EEXIST
124575 error Refusing to delete /usr/bin/lb-ng: ../lib/node_modules/strongloop/node_modules/loopback-sdk-angular-cli/bin/lb-ng symlink target is not controlled by npm /usr
124576 error File exists: /usr/bin/lb-ng
124577 error Move it away, and try again.
124578 verbose exit [ 1, true ]

I start new loopback project every month approximately and I faced this issue in the recent project.
I think it's a major bug and must be fixed quickly.
Thanks.

@viamgr @tamitutor @eduardongarcia Can you try installing again? I submitted a fix at https://github.com/strongloop/strongloop/commit/829f6b2b4449922e33bff6475b97c8caedd89895 and I want make sure its working.

In my case (OS X), I had to manually remove the file lb-ng (a symbolic link) at /usr/local/bin/ and the installation went without issues.

Closing as resolved by https://github.com/strongloop/strongloop/pull/327. Please create a new issue if you are still running into issues.

+1 windows 10@latest

Was this page helpful?
0 / 5 - 0 ratings