包未安装或者包版本过新,再者安装位置有误。

  我安装各种工具库或者其他包时有个 -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'的更多相关文章

  1. 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 ...

  2. 初学Vue 遇到Module not found:Error:Can`t resolve 'less-loader' 问题

    学习vue时,导入一个子组件时遇到Module not found:Error:Can`t resolve 'less-loader' 问题,实际上时在子组件中的样式里加了这么个代码 <styl ...

  3. 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 ...

  4. 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 ...

  5. 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 ...

  6. 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 ...

  7. 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 ...

  8. vue报错——Module not found: Error: Can't resolve 'less-loader sass' in ...

    npm install sass-loader -D npm install node-sass -D

  9. Module not found: Error: Can't resolve ' vue-resource'

    问题: 在学习vue的过程中出现了这个问题,说明VueResource模块没有安装. 解决方法: 打开终端,进入当前项目所在目录,输入指令 npm install vue-resource --sav ...

  10. vue项目出现Module not found: Error: Can't resolve 'stylus-loader'错误解决方案

    因为没有安装stylus和stylus-loader npm install stylus stylus-loader --save-dev 安装成功后,使用npm install重新建立依赖 打开项 ...

随机推荐

  1. Mac下如何使用EVE-NG的telnet客户端和wireshark抓包

    当我没有安装SecureCRT,点击启动的设备,弹出使用终端打开,但是由于eve中telnet使用的url是telnet xx.xx.xx.xx:xxxx 的形式,其在终端app中不能正常工作,tel ...

  2. defer和async区别

    浏览器会立即加载JS文件并执行指定的脚本,"立即"指的是在渲染该 script 标签之下的文档元素之前,也就是说不等待后续载入的文档元素,读到就加载并执行 加上async属性,加载 ...

  3. 前端JS常用设计模式

    话不多说,这里记录一些常见的设计模式,常看常新,也能提升JavaScript编程水平 一.设计原则 二.单例模式 单例模式的定义是,保证一个类仅有一个实例,并且要提供访问他的全局api 单例模式在前端 ...

  4. APPscan设置自动扫描时间

    一.设置位置 1.在设置自动扫描时间之前,我们要先创建扫描配置,然后再启动设置面板.2.启动AppScan,单击展开软件顶部菜单栏[工具]按钮,单击下拉菜单内[扫描调度程序],便可启动自动扫描的设置面 ...

  5. Spring-IoC中Set和构造器注入

    新建Maven工程 修改pom文件 1 <?xml version="1.0" encoding="UTF-8"?> 2 <project x ...

  6. centos7 安装 elasticsearch 7.15

    下载 elasticsearch wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.15.2-linu ...

  7. Linux让部署在服务器上的项目一直保持运行状态…&跑多个项目

    在idea通过package得到的.jar包或者.war包可通过 java -jar xxx.jar/xxx.war 命令直接在linux或者windows系统运行:   将打好包的项目放在linux ...

  8. vue echarts 多个图表自适应

    <template> <div :id="id" :style="{width: `${width}`, height: `${height}`}&qu ...

  9. 《JavaScript高级程序设计》Chapter03 JavaScript语言基础

    目录 Syntax Variable var let const Data Type Undefined Null Boolean Number String Symbol Object Operat ...

  10. JVM-创建一个对象的详细过程

    Person person=new Person(): 1.现在栈中申请一个自己的栈空间 2.类加载检查 每当使用new操作符创建一个对象时,类加载器都会从常量池中寻找该对象的符号引用,如果找到,则根 ...