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. HDU 1203 I NEED A OFFER!【01背包】

    解题思路:攒下的钱n相当于包的容量,然后是m个学校的申请费用,申请费用相当于每一个物品的消耗,得到offer的概率相当于每一个物品的价值. 因为要求的是至少得到一份0ffer的概率的最大概率,可以转化 ...

  2. win7(32位)旗舰版共享HP1010打印机给WINXP专业版

    一.状况: 两台电脑,同一网段内,电脑A是WIN7系统(32位),电脑B是WINXP系统. ①电脑A(win7)已经安装完打印机驱动,能正常打印,对该打印机HP1010共享时,提示“无法保存打印机设置 ...

  3. gbk编码

    GBK 编码   GBK编码范围:8140-FEFE,汉字编码范围见第二节:码位分配及顺序. GBK编码,是对GB2312编码的扩展,因此完全兼容GB2312-80标准.GBK编码依然采用双字节编码方 ...

  4. Eclipse本地创建新的GIT分支,并推送至远程Git分支

    本地创建新的GIT分支: 1.右击要创建新分支的项目——Team——Switch To——New Branch…: 2.在弹出的对话框中name框中输入要创建的分支名称,(如果是当前显示的要拷贝的分支 ...

  5. Codeforces Round #487 (Div. 2) C. A Mist of Florescence 构造

    题意: 让你构造一个 n∗mn*mn∗m 矩阵,这个矩阵由 444 种字符填充构成,给定 444 个整数,即矩阵中每种字符构成的联通块个数,n,mn,mn,m 需要你自己定,但是不能超过505050. ...

  6. C# 基础复习 二 面向对象

    继承:子承父业  子:子类    父:父类    业:所有非私有成员 好处:代码的复用   继承后,实例化子类时,不止子类的构造,父类的构造也会执行,而且父类的构造先于子类的构造执行 即使在子类可以看 ...

  7. [BZOJ3438][洛谷P1361]小M的作物

    题目大意:有A.B两个集合和n个物品,每个物品只能放在一个集合里.每个物品放在不同集合内能获得不同价值.有一些物品,如果它们同时放在一个集合内,则会产生新的价值(A和B中都有且不一定相同(c1和c2) ...

  8. Java获取当天、本周、本月、本季度、本年等 开始及结束时间

    package com.zhaochao.utils; import java.text.SimpleDateFormat; import java.util.Calendar; import jav ...

  9. 20130910.Windows上安装和配置MongoDB

    官方文档:http://docs.mongodb.org/manual/tutorial/ 1.下载软件 http://www.mongodb.org/downloads 2.解压 解压后进入bin目 ...

  10. ASP.NET-HTTP响应标头

    Reponse Headers 理论上所有的响应头信息都应该是回应请求头的.但是服务端为了效率,安全,还有其他方面的考虑,会添加相对应的响应头信息,从上图可以看到: Cache-Control:mus ...