MacBook-Air:~ xxx$ npm install webpack -g

npm WARN invalid config registry=""

npm WARN invalid config Must be a full url with 'http://'

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/acorn-dynamic-import

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/ajv

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/brorand

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/error-ex

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/for-in

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/for-own

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/fsevents/node_modules/abbrev

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/fsevents/node_modules/ansi-regex

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/fsevents/node_modules/aproba

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/fsevents/node_modules/aws4

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/fsevents/node_modules/bcrypt-pbkdf

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/fsevents/node_modules/chalk/node_modules/supports-color

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/fsevents/node_modules/jsbn

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/fsevents/node_modules/mime-db

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/fsevents/node_modules/mime-types

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/fsevents/node_modules/object-assign

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/fsevents/node_modules/gauge

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/fsevents/node_modules/qs

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/fsevents/node_modules/sshpk

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/fsevents/node_modules/strip-json-comments

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/fsevents/node_modules/rc

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/fsevents/node_modules/node-pre-gyp

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/fsevents

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/fsevents/node_modules/supports-color

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/hosted-git-info

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/is-buffer

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/loader-utils

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/elliptic

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/normalize-package-data

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/parse-asn1

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/readable-stream

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/uglify-js/node_modules/async

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/uglify-js

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/watchpack

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/fsevents/node_modules

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/fsevents/node_modules/chalk/node_modules

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/webpack/node_modules/uglify-js/node_modules

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules

- supports-color@2.0.0 node_modules/webpack/node_modules/fsevents/node_modules/chalk/node_modules/supports-color

- async@0.2.10 node_modules/webpack/node_modules/uglify-js/node_modules/async

/usr/local/lib

└─┬ webpack@2.2.1

├── acorn-dynamic-import@2.0.2

├── ajv@4.11.5

├── loader-utils@0.2.17

├─┬ memory-fs@0.4.1

│ └── readable-stream@2.2.6

├─┬ node-libs-browser@2.0.0

│ └─┬ crypto-browserify@3.11.0

│ └─┬ browserify-sign@4.0.0

│ ├─┬ elliptic@6.4.0

│ │ ├── brorand@1.1.0

│ │ ├── hmac-drbg@1.0.0

│ │ └── minimalistic-crypto-utils@1.0.1

│ └── parse-asn1@5.1.0

├── uglify-js@2.8.14

├─┬ watchpack@1.3.1

│ └─┬ chokidar@1.6.1

│ ├─┬ anymatch@1.3.0

│ │ └─┬ micromatch@2.3.11

│ │ ├─┬ kind-of@3.1.0

npm ERR! Darwin 15.5.0

npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "webpack" "-g"

npm ERR! node v6.2.0

npm ERR! npm v3.8.9

npm ERR! path /usr/local/lib/node_modules/webpack/node_modules/acorn-dynamic-import

npm ERR! code EACCES

npm ERR! errno -13

npm ERR! syscall access

 

npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/webpack/node_modules/acorn-dynamic-import'

npm ERR! at Error (native)

npm ERR! { Error: EACCES: permission denied, access '/usr/local/lib/node_modules/webpack/node_modules/acorn-dynamic-import'

npm ERR! at Error (native)

npm ERR! errno: -13,

npm ERR! code: 'EACCES',

npm ERR! syscall: 'access',

npm ERR! path: '/usr/local/lib/node_modules/webpack/node_modules/acorn-dynamic-import' }

npm ERR!

npm ERR! Please try running this command again as root/Administrator.

40mis-buffer@1.1.5

│ │ └─┬ object.omit@2.0.1

│ │ └─┬ for-own@0.1.5

│ │ └── for-in@1.0.2

│ └─┬ fsevents@1.1.1

│ └─┬ node-pre-gyp@0.6.33

│ ├─┬ nopt@3.0.6

│ │ └── abbrev@1.1.0

│ ├─┬ npmlog@4.0.2

│ │ └─┬ gauge@2.7.3

│ │ ├── aproba@1.1.1

│ │ ├── object-assign@4.1.1

│ │ └─┬ strip-ansi@3.0.1

│ │ └── ansi-regex@2.1.1

│ ├─┬ rc@1.1.7

│ │ └── strip-json-comments@2.0.1

│ └─┬ request@2.79.0

│ ├── aws4@1.6.0

│ ├─┬ har-validator@2.0.6

│ │ └─┬ chalk@1.1.3

│ │ └── supports-color@2.0.0

│ ├─┬ http-signature@1.1.1

│ │ └─┬ sshpk@1.10.2

│ │ ├── bcrypt-pbkdf@1.0.1

│ │ └── jsbn@0.1.1

│ ├─┬ mime-types@2.1.14

│ │ └── mime-db@1.26.0

│ └── qs@6.3.1

├── webpack-sources@0.1.5

└─┬ yargs@6.6.0

└─┬ read-pkg-up@1.0.1

└─┬ read-pkg@1.1.0

├─┬ load-json-file@1.1.0

│ └─┬ parse-json@2.2.0

│ └── error-ex@1.3.1

└─┬ normalize-package-data@2.3.6

└── hosted-git-info@2.3.1

 

 

npm ERR! Please include the following file with any support request:

npm ERR! /Users/xxx/npm-debug.log

解决办法就用这一条命令 : sudo npm install webpack -g 成功在全局安装了webpack;

mac终端安装webpack的时候报错Err,解决的办法 sudo npm install webpack -g的更多相关文章

  1. 安装vue-cli时-4058报错的解决方法

    一.报错信息 安装vue-cli时-4058报错 二.解决办法 1.安装淘宝镜像 npm --registry https://registry.npm.taobao.org info undersc ...

  2. 【adb命令】在cmd窗口中使用adb install命令安装 中文名字apk报错的解决办法

    1.在cmd窗口中使用adb install命令安装中文名字apk报错,安装英文名字apk就正常,详细报错如下图: 2.查看adb版本号:adb version 3.怀疑是adb版本的原因,尝试换个最 ...

  3. 安装Oracle JDK 7.0与8.0 for Mac OS X后Eclipse启动报错的解决之道

    启动 Eclipse 时,直接报错The JVM shared library "/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Cont ...

  4. Mac 下使用brew install 报错: Cowardly refusing to `sudo brew install'

    Mac 下使用brew install 报错: localhost:infer-osx-v0.6.0 admin$ sudo brew install opam Error: Cowardly ref ...

  5. Pycharm安装opencv与 无法安装PIL以及安装Pillow之后依然报错的解决办法

    Pycharm 安装opencv pycharm里自带了很方便的安装第三方库的方法,不需要自己去下载opencv包再pip install 在pycharm的File/Settings/Project ...

  6. npm install 安装项目依赖,报错ERR! Unexpected end of JSON input while parsing near的方法汇总

    问题描述: npm install 安装项目依赖的时候,有时会出现: ERR! Unexpected end of JSON input while parsing near 错误 原因: npm 的 ...

  7. mac下安装mysql 连接时候报错 ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

    http://segmentfault.com/q/1010000000094608 同样的问题,先在网上搜了下其他人解决这个问题的方法,是去修改mysql.cnf文件添加mysql.sock文件路径 ...

  8. 安装Nginx的各种报错的解决

    如题,本人环境Ubuntu14.0虚拟机,安装一个nginx服务器来运行我的fastDfs文件管理的.但是安装出现了各种问题: sudo ./configure --prefix=/usr/local ...

  9. webpack编译sass报错找不到module /css-loader/index.js... || 安装node-sass报错

    今天无论在家还是在公司,安装node-sass总是失败,或安装成功了,使用webpack编译sass报错,说找不到module,按照提示的错误我找了node_modules下的css-loader,发 ...

随机推荐

  1. spring-session与redis实现session共享

    一.准备 两个不同端口号的输出request.getLocalPort() + " ---> " + request.getSession(true).getId()的简单S ...

  2. java中静态,抽象,接口,继承总结

    (一).静态: 1.静态方法里只能访问静态变量,静态变量是类所特有的,所有类实例都作用同一个变量 静态随着类的加载而加载 (二). 抽象:抽象相当于接口,没有方法体,只定义方法,让子类实现,抽象类中可 ...

  3. Java使用反射通过对象属性获取属性的值

    代码: // 通过属性获取传入对象的指定属性的值 public String getValueByPropName(Student student, String propName) { String ...

  4. 在Windows环境下使用短信猫收发短信的简单配置:

    Windows简单配置: 1.插入usb接口,打开电脑的设备管理器,装驱动后,查看端口下设备的com(串口)是多少,接下来就是配置短信猫的必须参数: 如果短信猫是COM(串口)口的,一般端口是COM1 ...

  5. laydate日期范围控制

    1.html <input type="text" id="startTime" name="startTime" class=&qu ...

  6. pytorch实战(2)-----回归例子

    一.回归任务介绍: 拟合一个二元函数 y = x ^ 2. 二.步骤: 导入包 创建数据 构建网络 设置优化器和损失函数 前向和后向传播训练网络 画图 三.代码: 导入包: import torch ...

  7. HDU 5918 Sequence I

    题目来源:2016 CCPC 长春站 题意:给出两个序列 a[] , b[] ,如果b1,b2....bm能够与aq,aq+p,aq+2p...aq+(m-1)p对应( q+(m-1)p<=n ...

  8. [51nod1074]约瑟夫环V2

    N个人坐成一个圆环(编号为1 - N),从第1个人开始报数,数到K的人出列,后面的人重新从1开始报数.问最后剩下的人的编号. 例如:N = 3,K = 2.2号先出列,然后是1号,最后剩下的是3号. ...

  9. ansible yum 模块 安装 vsftp

    [root@ftp:/root] > ansible ansible01 -u root -k -m yum -a 'name=vsftpd state=latest' SSH password ...

  10. SpringMVC上传文件(图片)并保存到本地

    SpringMVC上传文件(图片)并保存到本地 小记一波~ 基本的MVC配置就不展示了,这里给出核心代码 在spring-mvc的配置文件中写入如下配置 <bean id="multi ...