npm install报错;

try running this command again as root/Administrator.

以管理员身份打开cmd

开始菜单-》所有程序-》附件,找到cmd,然后右键,以管理员身份运行。

看:http://blogs.msdn.com/b/matt-harrington/archive/2012/02/23/how-to-fix-node-js-npm-permission-problems.aspx

It turns out that you don’t have to run the command again as Administrator, and doing so won’t fix the problem.  Try npm cache clean first.  If that doesn’t fix things, take a look in%APPDATA%\npm-cache, or if you’re using PowerShell, $env:APPDATA\npm-cache.  After cleaning the cache, you may still be left with remnants.  Manually remove everything in that directory, and try again.  This has always fixed things for me.

一个回答:

在MAC上安装webpack以及reactjs等其它组件时,安装太慢卡住不动,直接ctrl+c终止后,再npm install后出npm WARN unmet dependency错误,npm cache clean后也不行。

解决方法是直接把当前的node_modules目录删除掉,重新npm install恢复正常。

node.js npm权限问题try running this command again as root/Administrator.的更多相关文章

  1. 解决npm ERR! Please try running this command again as root/Administrator. 问题

    win10下,使用npm 安装插件时报npm ERR! Please try running this command again as root/Administrator的错误, 解决方案:需要删 ...

  2. npm 报错: npm ERR! Please try running this command again as root/Administrator.

    解决方法: 1. 需要删除npmrc文件. 强调:不是nodejs安装目录npm模块下的那个npmrc文件 而是在C:\Users\{账户}\下的.npmrc文件.. 2. 在win8或者win10下 ...

  3. Mac Please try running this command again as root/Administrator.

    mac 终端安装程序,需要权限,出现以下提示语句: Please try running this command again as root/Administrator. 需要执行以下命令即可: s ...

  4. 搭建前端vue环境,安装vue-cli遇到Please try running this command again as root/Administrator的解决方案

    最近在搭前端环境,装完node.js之后,准备安装vue工程的初始化工具时(npm install -g vue-cli),遇到这个坑: 大体的意思就是权限问题,导致/usr/local/lib/no ...

  5. Mac环境下装node.js,npm,express

    1. 下载node.js for Mac 地址: http://nodejs.org/ 直接下载 pkg的,双击安装,一路点next,很容易就搞定了. 安装完会提醒注意 node和npm的路径是 /u ...

  6. Mac环境下装node.js,npm,express;(包括express command not found)

    1. 下载node.js for Mac 地址: http://nodejs.org/download/ 直接下载 pkg的,双击安装,一路点next,很容易就搞定了. 安装完会提醒注意 node和n ...

  7. Latest node.js & npm installation on Ubuntu 12.04

    转自:https://rtcamp.com/tutorials/nodejs/node-js-npm-install-ubuntu/ Compiling is way to go for many b ...

  8. Node.js npm

    Node程序包管理器(NPM)提供了以下两个主要功能: 在线存储库的Node.js包/模块,可搜索 search.nodejs.org 命令行实用程序来安装Node.js的包,做版本管理和Node.j ...

  9. 自制node.js + npm绿色版

    自制node.js + npm绿色版   Node.js官网有各平台的安装包下载,不想折腾的可以直接下载安装,下面说下windows平台下如何制作绿色版node,以方便迁移. 获取node.exe下载 ...

随机推荐

  1. delimiter

    http://www.mysqltutorial.org/getting-started-with-mysql-stored-procedures.aspx The first command is  ...

  2. quanpailie quanbianli

    #include<stdio.h>char data[5]={'a','b','c','d','e'};int vist[5]={0};char step[5]={0};char bu[5 ...

  3. Nginx目录别名(Alias)支持PHP的配置

    需求:通过 example.com 访问 /var/data/www,但通过 example.com/pa 访问的却是 /var/data/phpmyadmin,即保护phpmyadmin不暴露在ww ...

  4. 【转】Unity3D研究院之通过C#使用Advanced CSharp Messenger(五十)

    http://www.xuanyusong.com/archives/2165 Advanced CSharp Messenger 属于C#事件的一种. 维基百科中由详细的说明http://wiki. ...

  5. python的变量

    Python变量 在Python中,变量的概念基本上和初中代数的方程变量是一致的.例如,对于方程式 y=x*x ,x就是变量.当x=2时,计算结果是4,当x=5时,计算结果是25. 只是在计算机程序中 ...

  6. 查询mysql当前连接数

    标签: mysql服务器cachedisk 2012-08-23 23:06 23377人阅读 评论(0) 收藏 举报  分类: MySql(36)  1.show status Threads_co ...

  7. Asp.net Session保存到Redis: 使用 RedisSessionStateProvider

    Install-Package Microsoft.Web.RedisSessionStateProvider 依赖于: Dependencies StackExchange.Redis.Strong ...

  8. qt 屏幕旋转

    qt屏幕旋转的方法 参考链接 http://mikenoodle.blog.163.com/blog/static/11333522010102754154616/ http://blog.csdn. ...

  9. EncodingAESKey

    关键字:EncodingAESKey 公众平台消息体签名及加解密方案概述 1.新增消息体签名验证,用于公众平台和公众账号验证消息体的正确性 2.针对推送给微信公众账号的普通消息和事件消息,以及推送给设 ...

  10. 九个uname命令获取Linux系统详情的实例

    当你在控制台模式下,无法通过“鼠标右键 > 关于”获取操作系统的信息.这时,在Linux下,你可以使用uname命令,帮助你完成这些工作. Uname是unix name的缩写.在控制台中实际使 ...