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

  我安装各种工具库或者其他包时有个 -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. 20211306 《Python程序设计》实验三报告

    学号 20211306 <Python程序设计>实验三报告 课程:<Python程序设计> 班级: 2113 姓名: 丁文博 学号:20211306 实验教师:王志强 实验日期 ...

  2. python+pytesseract识别图片文字

    此文只介绍一下python+pytesseract识别一些简单图片的数字,字母和汉字.如图1 import pytesseract from PIL import Image,ImageEnhance ...

  3. 在mysql中正常查询的句子,在C#中出错,原因是定义了变量。

    在C#中 查询一样. 运行报错 Fatal error encountered during command execution." 命令执行过程中碰到的致命错误." MySqlE ...

  4. CentOS 8.x下编译php 7.4、php5.6、php5.3多版本报错处理教程

    一.编译安装php 7.4.x 参考CentOS 8.0.1905编译安装Nginx1.16.1+MySQL8.0.18+PHP7.3.10 1.安装编译工具及库文件(使用yum命令安装) yum i ...

  5. clamav测试用例 API

    最近接触到clamav这一块,本身是一个很简单的任务,只需要调用他的API对文件进行检测即可,但是在进行大量搜索发现,网上最多只有API的讲解,且质量层次不齐,这可为难住我了,作为一个名副其实的&qu ...

  6. Linux安装ODBC连接SQLServer数据库

    操作系统:Centos7.2 1.下载ODBC安装包 unixODBC-2.3.9.tar.gz freetds-1.3.9.tar.gz 下载这两个压缩包的地址:ftp://ftp.freetds. ...

  7. Oracle “ORA-12154: TNS: 无法解析指定的连接标识符”错误------网络摘录

    相信使用过Oracle数据库的人一定碰到过"ORA-12154: TNS: 无法解析指定的连接标识符"错误,我在此做一个小小的总结. 在程序中连接Oracle数据库的方式与其他常用 ...

  8. java注解-最通俗易懂的讲解

    来源:秒懂,Java 注解 (Annotation)你可以这样学 Annotation 中文译过来就是注解.标释的意思,在 Java 中注解是一个很重要的知识点,但经常还是有点让新手不容易理解. 我个 ...

  9. 2.javaOOP_Part2继承

  10. centos7安装ffmpeg shell脚本

    #!/bin/sh # # Date: 2021-04-28 # Author: yb # Description: 安装ffmpeg # 检测当前用户是否为root [ $(id -u) != &q ...