ui5-community / generator-ui5-project

Generator for UI5-based web-apps which use the official UI5 tooling and support multiple deployment targets such as the SAP Business Technology Platform
Apache License 2.0
33 stars 25 forks source link

npm global install fails on linux #10

Closed michelluther closed 3 years ago

michelluther commented 3 years ago

Dear team,

I am failing to npm install the generator in version 3.0.1 fails with authorization error on linux during the postinstallation.

This is what I do: sudo npm install generator-easy-ui5 -g

Maybe the sudo run as is not being propagated?

I have attached the result. installation_output.txt

Installation works fine with version 2.4.6.

Thanks a lot Michel

vobu commented 3 years ago

jep, the log hints to some dir confusion caused by sudo. just do a npm i -g yo generator-easy-ui5 (note the yo also being installed globally as a peer dep) hth, v.

vobu commented 3 years ago

(i closed this by accident, sorry. please reopen if necessary)

michelluther commented 3 years ago

Hi Volker,

thanks for looking into this.

It is the default behaviour for npm to install global packages into the folder /usr/lib/node_modules. Without sudo this will not work.

There are workarounds (like this one) for this, but by default, linux users will experience this, i believe. And so do i :-).

Cheers Michel

michelluther commented 3 years ago

I can confirm that the issue is resolved by changing the default folder for global packages for npm.

So it works for me now.

Cheers Michel