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

Ensure solid-server works when installed globally with npm #685

Closed
RubenVerborgh opened this issue May 28, 2018 · 19 comments
Closed

Ensure solid-server works when installed globally with npm #685

RubenVerborgh opened this issue May 28, 2018 · 19 comments
Labels
blocker on-hold priority-high to be used for important issues and pull requests that need to be addressed soon
Milestone

Comments

@RubenVerborgh
Copy link
Contributor

There are reports of the solid-server executable not working when installed globally. It's rather important that it does, however, or we essentially have a broken npm package.

While this is hard to test on Travis, Solid developers could always run the global executable:

npm ls
solid-server start # rather than bin/solid-server
@RubenVerborgh RubenVerborgh added priority-high to be used for important issues and pull requests that need to be addressed soon blocker labels May 28, 2018
@akuckartz
Copy link

Are there any tests which are run automatically ?

@RubenVerborgh
Copy link
Contributor Author

RubenVerborgh commented May 28, 2018 via email

@justinwb
Copy link
Contributor

justinwb commented Jul 9, 2018

Running into an issue when doing a clean global install on ubuntu.
npm = 5.6
node = 8.11.3

$ sudo npm install -g solid-server
npm WARN deprecated [email protected]: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm ERR! code 1
npm ERR! Command failed: /usr/bin/git clone -q git://github.com/solid/oidc-op.git /home/ubuntu/.npm/_cacache/tmp/git-clone-1fab4c56
npm ERR! /home/ubuntu/.npm/_cacache/tmp/git-clone-1fab4c56/.git: Permission denied
npm ERR!

npm ERR! A complete log of this run can be found in:
npm ERR! /home/ubuntu/.npm/_logs/2018-07-09T17_16_24_769Z-debug.log

@RubenVerborgh
Copy link
Contributor Author

Seems like that specific issue would be solved in develop, as that version no longer depends on a package from GitHub (and it shouldn't).

@kjetilk Shall we release a new patch version?

@kjetilk
Copy link
Member

kjetilk commented Jul 9, 2018

Yeah, lets do a patch version! Lets find a time for you to walk me through the release process.

@RubenVerborgh
Copy link
Contributor Author

Okay, ping me tomorrow afternoon!

@justinwb
Copy link
Contributor

justinwb commented Jul 9, 2018

let me know once it's pushed and i'll confirm the fix 👍

@RubenVerborgh
Copy link
Contributor Author

@justinwb Published, please test :-)

There might be other blockers ahead, but not the git ones.

@justinwb
Copy link
Contributor

This is still happening to me, but i believe that i tracked down the root cause, identified in this issue: zkat/pacote#105

I can confirm that when i run the global install as sudo, i get the error error time. However, if I su to root rather than 'sudo -s' or running the command as sudo, the install works correctly.

@RubenVerborgh
Copy link
Contributor Author

This is still happening to me

The exact same error? Because the dependency on a git repository should be gone.

zkat/pacote#105

They mention npm 5.x there. Does it also happen if you sudo npm install -g npm@latest before?

@justinwb
Copy link
Contributor

It was almost exactly the same, although i noticed the flags getting passed to git were slightly different. I should've grabbed them and pasted back in, but I can reproduce exactly later tonight. I was at least able to get around it by su'ing so I'm not blocked, but I'd still consider this a blocking issue since we recommend global install and 99% of people will do that via sudo because they're using cloud instances. I will test with latest npm tonight.

@RubenVerborgh
Copy link
Contributor Author

Yeah the su thing is definitely a blocker; don't know if nvm is the easier option, since that might get messy with different users, too.

@RubenVerborgh RubenVerborgh added this to the 5.0.0 milestone Jul 19, 2018
@kjetilk kjetilk modified the milestones: 5.0.0, 4.1.0 Aug 7, 2018
@kjetilk
Copy link
Member

kjetilk commented Aug 7, 2018

Hmmm, this seems like something we should have fixed soon, but are we effectively blocked by the upstream issue?

@kjetilk kjetilk removed this from the 4.1.0 milestone Aug 10, 2018
@justinwb
Copy link
Contributor

As some added context for this, here's a log demonstrating the issue exactly with a clean install, as well as testing LTS and latest version of npm. Note that switching from sudo to straight su works at the end...

$ sudo -s
# curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
# apt-get install -y nodejs
# apt-get install -y build-essential
# npm -v
5.6.0
# npm install -g solid-server
npm WARN deprecated [email protected]: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm ERR! code 1
npm ERR! Command failed: /usr/bin/git clone --depth=1 -q -b rc-0.3.2 git://github.com/solid/oidc-op.git /home/ubuntu/.npm/_cacache/tmp/git-clone-38eb91d4
npm ERR! /home/ubuntu/.npm/_cacache/tmp/git-clone-38eb91d4/.git: Permission denied
npm ERR! 

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ubuntu/.npm/_logs/2018-08-12T02_39_01_598Z-debug.log
# npm install -g npm@latest
# npm -v
6.3.0
# npm install -g solid-server
npm WARN deprecated [email protected]: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm ERR! code 1
npm ERR! Command failed: /usr/bin/git clone --depth=1 -q -b rc-0.3.2 git://github.com/solid/oidc-op.git /home/ubuntu/.npm/_cacache/tmp/git-clone-86633c9f
npm ERR! /home/ubuntu/.npm/_cacache/tmp/git-clone-86633c9f/.git: Permission denied
npm ERR! 

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ubuntu/.npm/_logs/2018-08-12T02_40_50_718Z-debug.log
# exit
$ su
# npm install -g solid-server
SUCCESS

@kjetilk
Copy link
Member

kjetilk commented Aug 12, 2018

OK, thanks a lot, @justinwb !

So, we'll do #749 for 4.1.0. and hope that this is solved somewhere down the road.

@kjetilk
Copy link
Member

kjetilk commented Aug 22, 2018

There's a PR upstream now, if anyone wants to try it out.

@RubenVerborgh RubenVerborgh added this to the 5.0.0 milestone Aug 24, 2018
@cory2067
Copy link

Not sure if it's some incorrect config on my part, but I haven't had luck with global install:

$ sudo npm install -g solid-server
$ solid init
$ solid start
internal/modules/cjs/loader.js:596
    throw err;
    ^

Error: Cannot find module '@trust/keychain'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15)
    at Function.Module._load (internal/modules/cjs/loader.js:520:25)
    at Module.require (internal/modules/cjs/loader.js:650:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/solid-server/node_modules/@trust/oidc-op/src/Provider.js:8:18)
    at Module._compile (internal/modules/cjs/loader.js:702:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
    at Module.load (internal/modules/cjs/loader.js:612:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
    at Function.Module._load (internal/modules/cjs/loader.js:543:3)

@kjetilk
Copy link
Member

kjetilk commented Aug 31, 2018

Hi @cory2067 ! That's definitly not your fault! We should get #749 ironed out very soon now and release 4.1.2, and then you could try again, as we think it should work.

@justinwb
Copy link
Contributor

justinwb commented Sep 5, 2018

Can confirm that this problem has been resolved in release v4.1.2-rc.0 (ae99c39)...

ubuntu@inrupt-solid-uat:~$ sudo -s
root@inrupt-solid-uat:~# npm install -g solid-server
npm WARN deprecated [email protected]: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated [email protected]: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
/usr/bin/solid -> /usr/lib/node_modules/solid-server/bin/solid
+ [email protected]
added 12 packages, removed 37 packages, updated 18 packages and moved 2 packages in 8.505s

@cory2067 - While your issue was not specifically the same as the issue reported here, the fix was, and you should no longer be running into this anymore either with the latest release (v4.1.2-rc.0)

@justinwb justinwb closed this as completed Sep 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker on-hold priority-high to be used for important issues and pull requests that need to be addressed soon
Projects
None yet
Development

No branches or pull requests

5 participants