制作个网站大概多少钱,网站开发与应用 论文,网站网页的像素尺,网页设计制作网站用什么软件安装webpack步骤
Mac在终端先获取root权限 在mac下依赖包要写入系统重要文件夹里#xff0c;由于没有先获取root权限所以写入失败#xff0c;导致安装失败。失败显示#xff1a;
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules…安装webpack步骤
Mac在终端先获取root权限 在mac下依赖包要写入系统重要文件夹里由于没有先获取root权限所以写入失败导致安装失败。失败显示
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access /usr/local/lib/node_modules
npm ERR! [Error: EACCES: permission denied, access /usr/local/lib/node_modules] {
npm ERR! errno: -13,
npm ERR! code: EACCES,
npm ERR! syscall: access,
npm ERR! path: /usr/local/lib/node_modules
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.npm ERR! A complete log of this run can be found in:
npm ERR! /Users/gaorongrong/.npm/_logs/2021-08-08T08_34_15_754Z-debug.log$ sudo -s回车输入密码即可
直接下载webpack会很慢建议先下载国内镜像
npm install -g cnpm --registryhttp://registry.npm.taobao.org用cnpm下载webpack全局安装webpack如果之前安装过webpack或安装失败先卸载cnpm uninstall webpack -g
cnpm install webpack3.6.0 -g指定版本号3.6.0因为vue cli2依赖该版本
4.查看安装成功的版本号
webpack --version