我开始接触Git、NVM、NPM等工具。到目前为止,我已经做了几次尝试,但在大多数教程的范围之外总是遇到障碍。
因此,我按照npmjs.com上的安装说明进行了安装,最终结果如下
my-imac:~ myname$ curl -o-
https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh |
bash
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 12540 100 12540 0 0 87501 0 --:--:-- --:--:-- --:-
-:-- 87692
=> Downloading nvm from git to '/Users/mvallesillas/.nvm'
=> Cloning into '/Users/mvallesillas/.nvm'...
remote: Counting objects: 264, done.
remote: Compressing objects: 100% (229/229), done.
remote: Total 264 (delta 31), reused 107 (delta 25), pack-reused 0
Receiving objects: 100% (264/264), 116.46 KiB | 19.41 MiB/s, done.
Resolving deltas: 100% (31/31), done.
Note: checking out '7ad6d98cedde01809e32d56ab8ced064f6f28175'.
You are in 'detached HEAD' state. You can look around, make
experimental
changes and commit them, and you can discard any commits you make in
this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you
may
do so (now or later) by using -b with the checkout command again.
Example:
git checkout -b <new-branch-name>
=> Compressing and cleaning up git repository
=> Profile not found. Tried ~/.bashrc, ~/.bash_profile, ~/.zshrc, and
~/.profile.
=> Create one of them and run this script again
OR
=> Append the following lines to the correct file yourself:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
npm ERR! invalid: minizlib@1.0.3
/usr/local/lib/node_modules/npm/node_modules/tar/node_modules/minizlib
=> You currently have modules installed globally with `npm`. These will no
=> longer be linked to the active version of Node when you install a new node
=> with `nvm`; and they may (depending on how you construct your `$PATH`)
=> override the binaries of modules installed with `nvm`:
/usr/local/lib
├── gulp-cli@1.3.0
=> If you wish to uninstall them at a later point (or re-install them under your
=> `nvm` Nodes), you can remove them from the system Node as follows:
$ nvm use system
$ npm uninstall -g a_module
=> Close and reopen your terminal to start using nvm or run the following to use it now:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm发布于 2018-04-14 12:22:15
(这里是nvm维护者)
看起来您的node/npm系统安装可能搞砸了,需要重新安装(在nvm之外)。但是,如果您在repo上提交了一个问题并填写了模板,我可以更详细地帮助您。
https://stackoverflow.com/questions/48674307
复制相似问题