作者:痞子彪2012_890 | 来源:互联网 | 2023-05-17 12:32
tl;dr:howtoinstallnodeproperly,withoutallthe$PATHerrorsandcommandnotfound?tl;dr:如何正确
tl;dr: how to install node properly, without all the $PATH errors and command not found
?
tl; dr:如何正确安装节点,没有找到所有$ PATH错误和命令?
Let me illustrate my problem with the following story:
让我用以下故事来说明我的问题:
I've been trying to install node "properly". I did the basic install, with it's installer, and found this (tl;dr: do not sudo node).
我一直在尝试“正确”安装节点。我用它的安装程序进行了基本安装,并找到了这个(tl; dr:不要sudo节点)。
Ok, let's remove node and reinstall it with nvm and all. Great. Now, my $PATH doesn't point properly. Let's search a way to fix the $PATH.
好吧,让我们删除节点并用nvm和all重新安装它。大。现在,我的$ PATH没有正确指出。让我们搜索修复$ PATH的方法。
Fixed the $PATH after several tries and failures? Great. Let's test... node -v
returns 4.5.0
... hmm, I'm sure it had a different version. Anyways, let's try installing gulp.
几次尝试和失败后修复了$ PATH?大。让我们测试... node -v返回4.5.0 ...嗯,我确定它有不同的版本。无论如何,让我们尝试安装gulp。
npm install --global gulp-cli
, great, installed. Let's npm gulp -v
to see if everything is alright —and it looks alright, as it returns 2.15.9
.
npm install --global gulp-cli,很棒,已安装。让npm gulp -v查看一切是否正常 - 它看起来没问题,因为它返回2.15.9。
So, if I just gulp
it should return an error (as I don't have a gulpfile or packages.json). When I gulp
at the terminal, it returns: zsh: command not found: gulp
所以,如果我只是gulp它应该返回一个错误(因为我没有gulpfile或packages.json)。当我吞噬终端时,它返回:zsh:command not found:gulp
So, i find out there's something not working properly again.
所以,我发现有些东西不能正常工作。
After several tries, removes, uninstalls and reinstalls, I beg your help. How can I remove everything node related from my computer and which is the best way to install node? I just want to use gulp, eslint and sublime text 2 with it.
经过几次尝试,删除,卸载和重新安装,求求你的帮助。如何从计算机中删除与节点相关的所有节点,这是安装节点的最佳方法?我只想用它来使用gulp,eslint和sublime text 2。
If I'm doing something terribly wrong or saying incorrect things... call me dumb but please do correct me.
如果我正在做一些非常错误的事情或者说不正确的事情......请叫我笨,但请纠正我。
OSx El Capitan 10.11.16 iTerm2 3.0.7 with Oh My Zsh Sublime Text Stable Channel, Build 3114
OSx El Capitan 10.11.16 iTerm2 3.0.7 with Oh My Zsh Sublime Text Stable Channel,Build 3114
1 个解决方案