webpack npm 报错问题集合
全局安装npm包报错 Error: EACCES: permission denied, mkdir '/Users/lyc/.npm/sentry-cli'
$ sudo npm i -g @sentry/cli /usr/local/bin/sentry-cli -> /usr/local/lib/node_modules/@sentry/cli/bin/sentry-cli > @sentry/[email protected] install /usr/local/lib/node_modules/@sentry/cli > node scripts/install.js Error: EACCES: permission denied, mkdir '/Users/lyc/.npm/sentry-cli' npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @sentry/[email protected] install: `node scripts/install.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @sentry/[email protected] install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /Users/lyc/.npm/_logs/2019-08-04T00_15_56_196Z-debug.log
权限问题,解决方案: --unsafe-perm=true --allow-root
$ sudo npm i -g @sentry/cli --unsafe-perm=true --allow-root
也是npm install Error Error: EACCES: permission denied, open 'xxx'
提示是权限够不,但是添加sudo之后,后续仍然其他的权限问题
解决方案:
sudo chown -R $USER:$GROUP ~/.npm sudo chown -R $USER:$GROUP ~/.config
npm 运行报错 Cannot find file: 'index.js' does not match the corresponding name on disk: 'xxx '
报错结果整体如下
Failed to compile. ./src/components/model/Monkey.jsx Cannot find file: 'index.js' does not match the corresponding name on disk: './node_modules/Konva/lib/konva'.
其实就是找不到对应模块。
看了一下引入模块的地方 是这么写的 import Konva from 'Konva'
把Konva
改成Konva
即可
相关推荐
不知道该写啥QAQ 2020-11-12
webfullStack 2020-11-09
Yvettre 2020-09-15
想做大牛的蜗牛 2020-10-30
gloria0 2020-10-26
gaojie0 2020-09-11
SelinaChan 2020-08-14
不知道该写啥QAQ 2020-08-09
gloria0 2020-08-09
不知道该写啥QAQ 2020-08-02
hline 2020-07-29
SelinaChan 2020-07-28
wangdianyong 2020-07-23
webpackvuees 2020-07-23
yqoxygen 2020-07-20
不知道该写啥QAQ 2020-07-18
waterv 2020-07-18
81463166 2020-07-17