报错信息

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"的更多相关文章

  1. Module not found: Error: Can't resolve 'less-loader' in ' xxx' (Day_40)

    1. 错误代码: 2. 解决方法: 删除项目文件夹下的node_modules文件夹 执行npm install命令

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

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

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

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

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

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

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

随机推荐

  1. 'pip' 不是内部或外部命令,也不是可运行的程序或批处理文件。

    解决方法: 本方法适用于已经成功安装python并配置了环境变量. 1.到官网下载pip.py文件 https://pypi.python.org/pypi/pip#downloads 点击下载,解压 ...

  2. 如何在vim中同时编辑多个文件

    参考:http://stackoverflow.com/a/53668/941650 Why not use tabs (introduced in Vim 7)? You can switch be ...

  3. Linux基础-命令概述

    概述 很多人可能在电视或电影中看到过类似的场景,黑客面对一个黑色的屏幕,上面飘着密密麻麻的字符,梆梆一顿敲,就完成了窃取资料的任务,是不是很帅!我们作为一个开发者, 即使不为了成为上述的人, 也需要会 ...

  4. prim算法【最小生成树1】

    适用范围:要求无向图 prim算法(读者可以将其读作“普里姆算法”)用来解决最小生成树问题, 其基本思想是: ·对图G(VE)设置集合S,存放已被访问的顶点, ·然后每次从集合V-S中选择与集合S的最 ...

  5. compareTo冒泡比较时间字符串

    public static void main(String[] args) { List<String> dates = new ArrayList<String>(); d ...

  6. Django 自定义模型管理器(Manager)及方法

    转载自:https://www.cnblogs.com/sui776265233/p/11571418.html 1.自定义管理器(Manager) 在语句Book.objects.all()中,ob ...

  7. [Java Performance] 线程及同步的性能之线程池/ThreadPoolExecutors/ForkJoinPool

    线程池和ThreadPoolExecutors   虽然在程序中可以直接使用Thread类型来进行线程操作,但是更多的情况是使用线程池,尤其是在Java EE应用服务器中,一般会使用若干个线程池来处理 ...

  8. JS对象 window对象 屏幕可用高和宽度 1. screen.availWidth 属性返回访问者屏幕的宽度,以像素计,减去界面特性,比如任务栏。 2. screen.availHeight 属

    屏幕可用高和宽度 1. screen.availWidth 属性返回访问者屏幕的宽度,以像素计,减去界面特性,比如任务栏. 2. screen.availHeight 属性返回访问者屏幕的高度,以像素 ...

  9. redis实现分布式锁需要考虑的因素以及可重入锁实现

    死锁 错误例子 解决方式  防止死锁 通过设置超时时间  不要使用setnx key   expire 20  不能保证原子性 如果setnx程序就挂了 没有执行expire就死锁了  reidis2 ...

  10. ansible-继续普通用户权限运行

    ansible 远程以普通用户执行命令   1. ansible 10.0.0.1 -m raw -a "date" -u www 2.在ansible的主机配置文件中指定ssh_ ...