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 ...
随机推荐
- java获取字符串编码和转换字符串编码
public class EncodingUtil { // 这里可以提供更多地编码格式,另外由于部分编码格式是一致的所以会返回 第一个匹配的编码格式 GBK 和 GB2312 public stat ...
- POJ3641 Pseudoprime numbers (幂取模板子)
给你两个数字p,a.如果p是素数,并且ap mod p = a,输出“yes”,否则输出“no”. 很简单的板子题.核心算法是幂取模(算法详见<算法竞赛入门经典>315页). 幂取模板子: ...
- Spring 源码学习——Aop
Spring 源码学习--Aop 什么是 AOP 以下是百度百科的解释:AOP 为 Aspect Oriented Programming 的缩写,意为:面向切面编程通过预编译的方式和运行期动态代理实 ...
- python 自带http服务
python2: python -m SimpleHTTPServer python3: python3 -m http.server
- angularJS CDN
http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js
- [轉]Linux Data Structures
Table of Contents, Show Frames, No Frames Chapter 15 Linux Data Structures This appendix lists the m ...
- CF914D
CF914D 用线段树乱搞一下就行qwq #include<iostream> #include<cstring> #include<cstdio> #includ ...
- Raspberry Pi 4B 安装QT5和qtCreator
https://blog.csdn.net/coekjin/article/details/52049273 sudo apt-get install qt5-default sudo apt-get ...
- 使用sass
sass安装 compass安装 1.sass 需要安装ruby,然后通过gem安装sass. 2. less有想=两种安装方: 客户端安装: 引入less.js,然后就可以直接用.less文件 &l ...
- webpack 集成 Typescript && Less
webpack 集成 Typescript && Less TypeScript是JavaScript的一个类型化的超集,可以编译成纯JavaScript,在本指南中,我们将学习如何将 ...