为什么npm和node有两个不同的版本 [英] why does npm and node have two different versions
问题描述
所以我要检查npm和node上的版本,我相信它们的命令具有相同的操作,但是它们显示的版本不同 这是代码-
So i'm checking the versions on both npm and node, which I believe have the same action from their commands, but they show different versions Here's the code --
$ node -v
v6.10.3
$ npm -v
5.3.0
$ brew upgrade node
Error: node 8.4.0 already installed
$ brew upgrade npm
enter code here
推荐答案
此错误似乎是由模块v8-debug引起的,可能不是 与该版本的节点兼容. grunt-cli不使用 本机插件,因此请检查您的package.json安装脚本或尝试 从另一个文件夹安装grunt-cli.
This error appears to be caused by the module v8-debug possibly not being compatible with that version of node. grunt-cli doesn't use native addons so check your package.json install script or try installing grunt-cli from another folder.
也应该是npm install grunt-cli -g才能以全局方式安装 grunt-cli只允许访问命令grunt来运行本地grunt 项目.
Also it should be npm install grunt-cli -g to install globally as grunt-cli just gives access to the command grunt to run local grunt projects.
这篇关于为什么npm和node有两个不同的版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!