Module not found: Error: Can't resolve 'pubsub-js'
包未安装或者包版本过新,再者安装位置有误。
我安装各种工具库或者其他包时有个 -g 到全局的习惯,觉得装到全局时在文件夹中何时何处都可以用。
在子孙文件夹中引入时依赖会在子孙和文件根目录的node_modules中去找,导致上述报错。
在子文件中重新安装该包,eg:npm install pubsub-js
除此之外,安装完这包后,ESLint 插件开始作用了?在Vue子组件components中定义显示别称时(name:'School')报错:Component name "School" should always be multi-word。提示我用驼峰或者用kebab短横-拼接,不然飘红。可我非多单词命名,哪里能惯着它,让我奇怪的是之前居然没有飘红,装完pubsub就开始了,也许是冲突,或者ESLint偷偷升级了。
网上解决法一: 在vue.config.js配置 lintOnSave: false,//关闭语法检查。
无效,再查,法二: 停用ESLint插件,或者修改其中配置。法二确实能搞定,但是没有考虑日后
没办法,只能忍一忍,此飘红不影响整个项目运行。求其他解决方法。
今年秋招输得一败涂地的菜鸡随笔
Module not found: Error: Can't resolve 'pubsub-js'的更多相关文章
- Module not found: Error: Can't resolve 'XXX' in 'XXXX'
故障 控制台运行webpack/npm时出现 Module not found: Error: Can't resolve 'XXX' in 'XXXX' 解决方案 npm i XXX --save ...
- 初学Vue 遇到Module not found:Error:Can`t resolve 'less-loader' 问题
学习vue时,导入一个子组件时遇到Module not found:Error:Can`t resolve 'less-loader' 问题,实际上时在子组件中的样式里加了这么个代码 <styl ...
- angular2 ng build --prod 报错:Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory'
调试页面 ng serve 正常 ng build 也正常 ng build --prod 异常:Module not found: Error: Can't resolve './$$_gendir ...
- Webpack 4 : ERROR in Entry module not found: Error: Can't resolve './src'
ERROR in Entry module not found: Error: Can't resolve './src' in 'E:\ASUS\Documents\VSCode files\Web ...
- Module not found: Error: Can't resolve '@babel/runtime/helpers/classCallCheck' and Module not found: Error: Can't resolve '@babel/runtime/helpers/defineProperty'
These two mistakes are really just one mistake, This is because the following file @babel/runtime ca ...
- Module not found: Error: Can't resolve "xxx" in "xxx"
报错信息 ERROR in multi ./src/index.js ./dist/bundle.js Module not found: Error: Can't resolve './dist/b ...
- Module not found: Error: Can't resolve './style':配置 extensions 的坑
ERROR in ./src/index.js Module not found: Error: Can't resolve './style' in 'D:\gitcode\github\learn ...
- vue报错——Module not found: Error: Can't resolve 'less-loader sass' in ...
npm install sass-loader -D npm install node-sass -D
- Module not found: Error: Can't resolve ' vue-resource'
问题: 在学习vue的过程中出现了这个问题,说明VueResource模块没有安装. 解决方法: 打开终端,进入当前项目所在目录,输入指令 npm install vue-resource --sav ...
- vue项目出现Module not found: Error: Can't resolve 'stylus-loader'错误解决方案
因为没有安装stylus和stylus-loader npm install stylus stylus-loader --save-dev 安装成功后,使用npm install重新建立依赖 打开项 ...
随机推荐
- oracle修改表中的列
declare v_Count1 int := 0; v_Count2 int := 0; v_Count3 int := 0; v_Count4 int := 0; v_Count5 int := ...
- SAP ABAP 验证与替代
1.校验与替代的作用 校验(Validation):在凭证保存前根据设置条件判断此凭证是否有效,其中可以按抬头.行项目或完全凭证来判断,然后再根据Validation设置的消息类型决定凭证是否允许保存 ...
- 【pytest】执行测试不输出logging日志问题
[一] 今天更新了一波pytest,4.50 -> 6.2.3.执行了一波测试发现之前的logging输出不见了. 看了下启动参数 --log-cli-level=LOG_CLI_LEVEL 加 ...
- python使用openpyxl读取合并单元格的值(转)
目录问题:解决思路:问题:假设在test.xlsx的"Sheet1"工作表中,A1:D3区域的值如下:要求给定指定的行.列以及对应的工作表作为参数,能够正确解析合并单元格,获取指定 ...
- base64格式上传图片方法
function dataURItoBlob(dataURI) { const byteString = atob(dataURI.split(',')[1]); const mimeString = ...
- Redis工具类 单机+集群
package com.irdstudio.basic.framework.redis.redisutil; import org.springframework.dao.DataAccessExce ...
- js中的占位函数
String.prototype.signMix= function() { if(arguments.length === 0) return this; var param = arguments ...
- 前端实现文件上传——angular版本+ant design
html代码 <nz-upload *ngIf="uploadParams.parserTypeId==3 || uploadParams.parserTypeId==4" ...
- ORACLE触发器:插入数据时,对其中的一个字段进行默认赋值
Create trigger t_datebefore insertbegin:new.sj = to_char(sysdate,'yyyy-MM-dd HH:mm:ss')end
- PointGNN未修改之前的结果 ---行人,骑行者
dl 18 23