npm command not found after updating to Mac OSX 10

2019-04-11 10:25发布

I can't do npm command on terminal after updating my OS to Mavericks.

when I try this: node /usr/local/lib/node_modules/npm/bin/npm-cli.js -v it is working and showing the version 1.4.3

I don't know what's happening here, can anyone help me? Thanks

1条回答
爷的心禁止访问
2楼-- · 2019-04-11 11:18

Try relinking the bin:

ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/bin/npm

You might need to run as root.

查看更多
登录 后发表回答