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

Trouble with 'npm install -g strongloop' #221

Closed
darrin opened this issue May 7, 2015 · 7 comments
Closed

Trouble with 'npm install -g strongloop' #221

darrin opened this issue May 7, 2015 · 7 comments

Comments

@darrin
Copy link

darrin commented May 7, 2015

Hello all -

Product looks pretty promising thanks for putting it together.

I ran into this problem while trying to install strongloop via 'npm install -g strongloop':

> ws@0.5.0 install /usr/local/lib/node_modules/strongloop/node_modules/strong-arc/node_modules/strong-mesh-client/node_modules/engine.io/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/bufferutil.node
  SOLINK_MODULE(target) Release/bufferutil.node: Finished
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/validation.node
  SOLINK_MODULE(target) Release/validation.node: Finished
npm ERR! Darwin 14.1.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "-g" "--unsafe-perm" "install" "strongloop"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1
npm ERR! code ETARGET

npm ERR! notarget No compatible version found: JSONStream@'>=1.0.3 <2.0.0'
npm ERR! notarget Valid install targets:
npm ERR! notarget ["0.0.0","0.1.0","0.1.1","0.1.2","0.1.3","0.2.0","0.2.1","0.2.2","0.2.3","0.3.0","0.3.1","0.3.2","0.3.3","0.4.0","0.4.1","0.4.2","0.4.3","0.4.4","0.5.0","0.6.0","0.6.1","0.6.2","0.6.3","0.6.4","0.7.0","0.7.1","0.8.0","0.7.2","0.7.3","0.7.4","0.8.1","0.8.2","0.8.3","0.8.4","0.9.0","0.10.0"]
npm ERR! notarget 
npm ERR! notarget This is most likely not a problem with npm itself.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/darrin/src/me/tot/npm-debug.log

I tried a number of things from updates to uninstalling packages, etc. What finally did the trick for me was to uninstall and reinstall node, all global packages and then to reinstall strongloop. I followed a stack overflow post to do this - though I had to sprinkle sudo generously into the command to get it to remove everything.

After this I was able to rerun:
npm install -g strongloop

This is probably a newbie mistake on my part but thought it might save someone time...

Best regards,
-Darrin

@rmg
Copy link
Member

rmg commented May 7, 2015

We released strongloop@3.1.2 just a couple hours ago with a workaround for this as well.

@darrin
Copy link
Author

darrin commented May 7, 2015

Interesting - I tried a previous version (strongloop@3.0.3) which I found referenced in a post - that supposedly fixed a problem like this as well... But that didn't work. I more/less made the assumption that this was a problem with my environment that others might have as well... anyway - feel free to close this issue if you like. No real reason to keep it open other than to keep others informed.

@rmg
Copy link
Member

rmg commented May 7, 2015

It was ultimately caused by browserify/browserify#1247 which caused a problem for anyone on OS X or Windows due to JSONStream and jsonstream being different on npmjs.org but mapping to the same cache entry on case-insensitive filesystems.

The workaround we published was to add a jsonstream dependency to the top level strongloop package so that by the time the browserify dependencies were being resolved it would see that it was already installed and move on.

@zertosh
Copy link

zertosh commented May 7, 2015

It's all back to normal now. JSONStream@1.0.3 was published and I re-updated browserify and it's deps to use it instead of "jsonstream" (browserify/browserify#1251). Sorry everyone.

@ynagarjuna2012
Copy link

Solution : FIX FOR THE ABOVE ISSUE

Hey

Error goes like this ..

vagrant@strongloop:~$ sudo npm install -g strongloop
npm WARN deprecated json-file-plus@2.0.0: Before v3.0.0, errors in fs.writeFile
would not be propagated

heapdump@0.3.5 install /usr/local/lib/node_modules/strongloop/node_modules/str
ong-supervisor/node_modules/heapdump
node-gyp rebuild

make: Entering directory /usr/local/lib/node_modules/strongloop/node_modules/st rong-supervisor/node_modules/heapdump/build' CXX(target) Release/obj.target/addon/src/heapdump.o SOLINK_MODULE(target) Release/obj.target/addon.node SOLINK_MODULE(target) Release/obj.target/addon.node: Finished COPY Release/addon.node make: Leaving directory/usr/local/lib/node_modules/strongloop/node_modules/str
ong-supervisor/node_modules/heapdump/build'

strong-fork-syslog@1.2.3 install /usr/local/lib/node_modules/strongloop/node_m
odules/strong-supervisor/node_modules/strong-fork-syslog
node-gyp rebuild

make: Entering directory /usr/local/lib/node_modules/strongloop/node_modules/st rong-supervisor/node_modules/strong-fork-syslog/build' CXX(target) Release/obj.target/syslog/syslog.o SOLINK_MODULE(target) Release/obj.target/syslog.node SOLINK_MODULE(target) Release/obj.target/syslog.node: Finished COPY Release/syslog.node make: Leaving directory/usr/local/lib/node_modules/strongloop/node_modules/str
ong-supervisor/node_modules/strong-fork-syslog/build'
npm WARN deprecated json-file-plus@1.0.7: Before v3.0.0, errors in fs.writeFile
would not be propagated

strong-agent@1.5.1 install /usr/local/lib/node_modules/strongloop/node_modules
/strong-agent
node-gyp rebuild || exit 0

make: Entering directory /usr/local/lib/node_modules/strongloop/node_modules/st rong-agent/build' CXX(target) Release/obj.target/strong-agent/src/strong-agent.o In file included from ../src/strong-agent.cc:15:0: ../src/watchdog.h: In function ‘void strongloop::agent::watchdog::PatchSyscall() ’: ../src/watchdog.h:169:52: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ../src/watchdog.h:198:52: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ../src/watchdog.h:199:75: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] SOLINK_MODULE(target) Release/obj.target/strong-agent.node SOLINK_MODULE(target) Release/obj.target/strong-agent.node: Finished COPY Release/strong-agent.node make: Leaving directory/usr/local/lib/node_modules/strongloop/node_modules/str
ong-agent/build'
npm WARN optional dep failed, continuing loopback@2.17.2

ws@0.4.32 install /usr/local/lib/node_modules/strongloop/node_modules/node-ins
pector/node_modules/ws
(node-gyp rebuild 2> builderror.log) || (exit 0)

Try the below steps to fix the issue

So please try to install node-gyp and json-file-plus using below commands

sudo npm install -g node-gyp

sudo npm install -g json-file-plus@3.0.0

I had the same issue with node v0.12.0, v0.12.1, npm v2.5.1 and operating system (Ubuntu 12.04.5 and 14.04 )Installation seems to hang but if you press enter couple of times its responsive again and you get into the shell.

After that you will notice that for some reason symbolic links are not being created but the module seems to be installed correctly.(Even if you don't get any output please try the below steps )
My error on my system :

To fix this I have created the sym links manually like this:

sudo ln -s /usr/local/lib/node_modules/strongloop/bin/slc /usr/local/bin/

This will enable you to use slc cli across the machine. Also, if you are using loopback-sdk-angular-cli which containes lb-ng and lb-ng-doc commands (which should be installed with npm install -g strongloop) you need to create those symlinks aswell. You do that like this:

sudo ln -s /usr/local/lib/node_modules/strongloop/node_modules/loopback-sdk-angular-cli/bin/* /usr/local/bin/

This will enable you to use lb-ng across the machine, however it could happen as well that the tool will be broken with missing dependency errors. To fix those, enter to the path where module installed and execute npm install to install dependencies. On ubuntu 14.04 LTS you do that like this:

cd /usr/local/lib/node_modules/strongloop/node_modules/loopback-sdk-angular-cli

npm install

Hope this helps ..

@rmg rmg closed this as completed May 12, 2015
@Ijmir
Copy link

Ijmir commented Jun 10, 2015

npm cache clean 

solved it for me

@kreso22
Copy link

kreso22 commented Jun 11, 2015

@Ijmir 's suggestion worked for me!

npm cache clean

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

6 participants