报错信息

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. kali开启禁止或删除ssh 开机启动

    开启禁止或删除ssh 开机启动 # update-rc.d ssh enable #//开机启动 # update-rc.d ssh disable #//禁止开机启动 # update-rc.d - ...

  2. WPF 依赖附加属性

    附加属性的本质是一个依赖属性,与普通的依赖属性区别: 1:注册方法名不一样,如 DependencyProperty.RegisterAttached 2:没有普通的属性包装器,而是通过get和set ...

  3. 慎用margin系列1---CSS的margin塌陷(collapse) 问题与对策

      对于以下简单代码: 如果您认为应该是这样的话: 那就错了.结果是这样的: 因为CSS中存在一个margin collapse,即边界塌陷或者说边界重叠.对于上下两个并列的div块而言,上面div的 ...

  4. 安装FTP

    yum install vsftpd -y cd /etc/vsftpd/ touch login.txt vim login.txt db_load -T -t hash -f /etc/vsftp ...

  5. JSP版本的数据库操作

    代码时间:2015-6-16 <%@ page language="java" import="java.util.*" pageEncoding=&qu ...

  6. 【记录】VScode快捷键大全

    记住快捷键能够提高工作效率 Ctrl+Shift+P,F1 展示全局命令面板 Ctrl+P 快速打开最近打开的文件 Ctrl+Shift+N 打开新的编辑器窗口 Ctrl+Shift+W 关闭编辑器 ...

  7. linux 虚拟机网卡配置

     第一种虚拟机   我们常用的虚拟机vmware虚拟机 今天为了学习ngnix,所以配了两台虚拟机.一个centos7 ,一个redhat. 哇啦哇啦安装,so easy,对吧....我选择的是精简版 ...

  8. 【前端优化】图片延迟加载Lazy-loading的原理与简单实现

    1.什么是lazy-loading 图片"懒加载" 为img标签src设置统一的图片链接,而将真实链接地址装在自定义属性中. 所以开始时候图片是不会加载的,我们将满足条件的图片的s ...

  9. Android蓝牙自动配对Demo,亲测好使!!!(转)

    蓝牙自动配对,即搜索到其它蓝牙设备之后直接进行配对,不需要弹出配对确认框或者密钥输入框. 转载请注明出处http://blog.csdn.net/qq_25827845/article/details ...

  10. div::before一个能插入元素的选择器

    div::before一个能插入元素的选择器