ElementsProject / filebazaar

Sell digital files with Bitcoin & Lightning :zap:
https://blockstream.com/2018/03/22/filebazaar-joins-the-lightning-charge-lapps.html
MIT License
122 stars 28 forks source link

Getting EACCESS and ELIFECYCLE errors trying to install on Ubuntu 18.04 #6

Closed chrisguida closed 4 years ago

chrisguida commented 5 years ago

See https://github.com/Automattic/node-canvas/issues/788#issuecomment-532392523

shesek commented 5 years ago

Thanks for the report. I updated to node-canvas v2 and published filebazaar v0.2.7. Can you check if this fixes the issue?

chrisguida commented 5 years ago

Still got the issue, although i think it may have been a permission issue on my end, I'm not sure.

I made myself owner of some npm-related folders, for instance:

sudo chown -R `whoami` /usr/local/lib/node_modules

...and that seems to have fixed the issue.

chrisguida commented 5 years ago

Is there any way I can try installing the old version to see if it works with my setup? Sorry, I'm kind of a newb at npm.

chrisguida commented 5 years ago

Well, I tried npm install filebazaar@0.2.6 and now I'm having permission issues again :(

Now it's having trouble creating a symlink.

chrisguida commented 5 years ago

Okay, weird, next I tried

sudo npm install -g filebazaar

Which gave me the symlink permission issue and the ELIFECYCLE error again.

Tried npm install -g filebazaar again, just to see what the error was, and boom! No error.

I'm so confused.

chrisguida commented 5 years ago

Oh, I think I know what happened. I sudo rm'd the symlink, so now it doesn't need permission to overwrite the old symlink I think.

chrisguida commented 5 years ago

Okay never mind. I see what's happening.

I run npm install -g filebazaar@0.2.6 and it gives me a "can't create symlink" EACCESS error, but not the ELIFECYCLE error. Perhaps this is because canvas is already installed properly from my earlier install of filebazaar@0.2.7?

Then I run sudo npm install -g filebazaar@0.2.6 and I get an ELIFECYCLE error, but the symlink gets created. It doesn't appear to be pointing to anything, though, which makes it appear red in ls -al.

Then I run npm install -g filebazaar@0.2.6 once again, and I get the ELIFECYCLE error.

Then I run npm install -g filebazaar to install 0.2.7, and the installation completes successfully.

So, yes, your update fixed the problem, but I also have some weird symlink creation problems. Is it best practice to chown /usr/local/bin to a non-root user?

shesek commented 5 years ago

What I would recommend is configuring npm to install global packages inside your home directory and adding that to your PATH. See instructions here. This typically resolves these pesky npm permission issues, which can indeed be a pain with how npm ships by default :(