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/bundle.js' in 'C:\Users\ASUS\Desktop\vue\webpack-study'
@ multi ./src/index.js ./dist/bundle.js main[1]
main.js
import $ from "jquery"
$(function () {
$("li:odd").css("backgroundColor", "lightblue")
$("li:even").css("backgroundColor", function(){
return "#"+"D97634"
})
})
package.json
{
"name": "webpack-study",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"jquery": "^3.4.1"
}
}
解决方法在终端使用,但有点过时了,但没有找到好一点的方法,只能将就这用了:
webpack ./src/main.js -o ./dist/bundle.js --mode development
Use `--mode production` for production.
Module not found: Error: Can't resolve "xxx" in "xxx"的更多相关文章
- Module not found: Error: Can't resolve 'less-loader' in ' xxx' (Day_40)
1. 错误代码: 2. 解决方法: 删除项目文件夹下的node_modules文件夹 执行npm install命令
- 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 './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 ...
随机推荐
- ubuntu+VS code+launch.json+task.json
1.ubuntu->vs code . 通过官方PPA安装Ubuntu make sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make s ...
- CSS3 resize 属性
CSS3 resize 属性 CSS 参考手册 实例 规定可以由用户调整 div 元素的大小: div { resize:both; overflow:auto; } 支持 Firefox 4+.Ch ...
- c# PID算法入门
离开工控行业已经有一段时间了,最近回忆起以前的工作,又对 PID 算法有了兴趣.所以写了一个小项目,希望可以帮到需要的人,也算是对那段工作经历的一个总结. 这是一个 winform 的项目.负载是一个 ...
- JUnit中Assert简单介绍
junit中的assert方法全部放在Assert类中,总结一下junit类中assert方法的分类.1.assertTrue/False([String message,]boolean condi ...
- 人生苦短,我学PYTHON
人生苦短我学PYTHON 坚持 努力
- Redis Desktop Manager连接Redis 遇到的一系列问题
最近在做一个土地项目的后台,主要是一个信息采集调查系统,使用的框架是: * 核心框架:Spring Framework 4.2 * 日志管理:SLF4J 1.7.Log4j 1.2 * 视图框架:Sp ...
- 【JDK1.8】Java 栈实现方式
看到一道面试题,问Java中栈的实现方式,记录下一些实现细节. API中有5个方法,分别是: boolean empty() E peek() E pop() E push() int search( ...
- 【JS学习】慕课网8-17编程练习 网页的返回与跳转
编程练习 制作一个跳转提示页面: 要求: 1. 如果打开该页面后,如果不做任何操作则5秒后自动跳转到一个新的地址,如慕课网主页. 2. 如果点击“返回”按钮则返回前一个页面. 代码如下: 需要注意的是 ...
- vue 条件渲染v-if v-show
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- delphi 打印 PDevMode 说明
//PDevMode = _devicemodeW;// _devicemodeW = record// dmDeviceName: array[0..CCHDEVICENAME - 1] of Wi ...