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重新建立依赖 打开项 ...
随机推荐
- 一套高效的iOS面试题一套高效的iOS面试题
runtime相关问题 runtime是iOS开发最核心的知识了,如果下面的问题都解决了,那么对runtime的理解已经很深了. runtime已经开源了,这有一份别人调试好可运行的源码objc-ru ...
- leetcode-560-和为 K 的子数组
给你一个整数数组 nums 和一个整数 k ,请你统计并返回 该数组中和为 k 的连续子数组的个数 . 示例 1: 输入:nums = [1,1,1], k = 2 输出:2 示例 2: 输入:num ...
- IE8兼容的零零碎碎
css部分 1 nth-of-type选择器 2 span:nth-of-type(1) 3 /*IE8兼容写法*/ 4 span:first-child /*选中第一个*/ 5 span:first ...
- 数论之GCD+LCM+扩展欧几里得
最大公约数GCD 整数a和b的最大公约数记为gcd(a,b) <1 经典的欧几里得算法,辗转相除法 int gcd(int a, int b){ return b == 0 ? a : gcd( ...
- pyqt学习
- Merge Overlapping Intervals
refer to: https://www.algoexpert.io/questions/Merge%20Overlapping%20Intervals Problem Statement Samp ...
- LeetCode刷题感想之DFS
在剑指Offer里专门有一个部分(大概是连续十几题的样子)考察了 DFS ,也就是深度优先遍历,感觉DFS 也是一种套路,只要思路找对,套一下思路也可以了,在这里记录一下. 在很多Leetcode 的 ...
- CI框架 between and sql语句
1.在文档里没有找到关于where() between and 相应的说明 每次组合查询 要么写原生 要么连续调用where方法. 可用以下方式组合 $condition = array(); $co ...
- nodejs的框架koa
koa:应用程序是一个包含一组中间件函数的对象,它是按照类似堆栈的方式组织和执行的 应用程序: 1.导入 const Koa = require('koa'); 2.创建koa的app实例 const ...
- Vue 加载显示源代码 , Vue 屏幕闪动
1.当网络较慢,网页还在加载 Vue.js ,而导致 Vue 来不及渲染,这时页面就会显示出 Vue 源代码.我们可以使用 v-cloak 指令来解决这一问题. <style> [v-cl ...