Skip to content

Node.js Snap does not include npm as a command automatically #10

Open
@rmmariano

Description

@rmmariano

I've installed Node by Snap. npm has been installed together, but I'm not able to use it as a simple npm command automatically, I need to use /snap/bin/npm instead.

I can create an alias manually, but I believe that the installation to do this automatically would be better.

I've used the following commands:

$ sudo snap install node --classic
node (14/stable) 14.17.0 from OpenJS Foundation (iojs✓) installed

$ node -v
nv14.17.0

$ npm -v
bash: /usr/local/bin/npm: No such file or directory

$ which node
/snap/bin/node

$ which npm
/snap/bin/npm

$ /snap/bin/npm -v
6.14.13

I'm using Ubuntu 18.04.5.

Thank you in advance.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions