Cannot resolve module 'child_process'

2023-05-16

ERROR in ./~/xmlhttprequest/lib/XMLHttpRequest.js
Module not found: Error: Cannot resolve module 'child_process' in D:\workspace\wosoPro\node_modules\xmlhttprequest\lib
 @ ./~/xmlhttprequest/lib/XMLHttpRequest.js 15:12-36
Child html-webpack-plugin for "index.html":
    chunk    {0} index.html 541 kB [rendered]
        [0] ./~/html-webpack-plugin/lib/loader.js!./index.html 1.71 kB {0} [built]
        [1] ./~/lodash/lodash.js 539 kB {0} [built]
        [2] (webpack)/buildin/module.js 241 bytes {0} [built]

解决方法:

解决问题的图片

在webpack.base.config.js文件中添加:

externals: [{
   xmlhttprequest:'{XMLHttpRequest:XMLHttpRequest}'
}]

参考来源:https://github.com/webpack/webpack-dev-server/issues/66

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Cannot resolve module 'child_process' 的相关文章

随机推荐

  • redisson-spring-boot-starter

    redisson spring boot starter spring boot 配置 spring redis redisson config classpath redisson beta yml 或者 spring redis red
  • URL中"#" "?" "&"号的作用

    10年9月 xff0c twitter改版 一个显著变化 xff0c 就是URL加入了 符号 比如 xff0c 改版前的用户主页网址为http twitter com username 改版后 xff0c 就变成了http twitter
  • STAR法则的简历应用

    STAR法则 即为Situation Task Action Result的缩写 xff0c 具体含义是 Situation 事情是在什么情况下发生 Task 你是如何明确你的任务的 Action 针对这样的情况分析 xff0c 你采用了什
  • BI商业智能

    关键字 xff1a 商务智能 xff0c 数据仓库 xff0c ETL BI xff08 Business Intelligence即商务智能 xff09 xff0c 百度百科用的解释是 xff0c 它是一套完整的解决方案 xff0c 用来
  • 遗传算法 一个模拟自然进化过程的启发式搜索算法

    关键字 xff1a 遗传算法 遗传算法 xff08 Genetic Algorithm xff09 是一种模拟自然界 自然选择 和 自然遗传 的启发式搜索算法 xff0c 通过模拟自然进化过程搜索最优解的方法 直到1989年 xff0c 实
  • PHP四大基本排序算法

    冒泡排序 思路分析 xff1a 在要排序的一组数中 xff0c 对当前还未排好的序列 xff0c 从前往后对相邻的两个数依次进行比较和调整 xff0c 让较大的数往下沉 xff0c 较小的往上冒 即 xff0c 每当两相邻的数比较后发现它们
  • 设置centos的YUM源为国内阿里云源

    阿里云Linux安装镜像源地址 xff1a http mirrors aliyun com http mirrors aliyun com repo CentOS系统更换软件安装源 第一步 xff1a 备份你的原镜像文件 xff0c 以免出
  • PHP八大设计模式

    PHP命名空间 可以更好地组织代码 xff0c 与Java中的包类似 Test1 php span class php span class hljs preprocessor lt php span span class hljs key
  • GitLab使用手册

    安装Git 安装环境 xff1a windows下载地址 xff1a git官方网站安装包 xff1a 64位安装过程 xff1a 傻瓜式安装至此安装完毕 生成私钥和公钥 ssh span class hljs attribute keyg
  • echarts使用心得

    前言 第一次参加工作 xff0c 公司使用图表很频繁 xff0c 我之前会highcharts xff0c 但是公司基本上都是使用的echarts xff0c 于是自己开始琢磨echarts xff0c 使用起来却颇费了一番工夫 所以就把使
  • JQuery插件之Masked Input

    Masked Input是一个字符输入格式化的jQuery插件 它可让你轻松的实现对各种数据的输入进行格式限制 xff0c 如日期 电话等 Masked Input在IE Firefox Safari和Chrome通过测试 Mask会自动为
  • 关于jQuery的九大使用误区

    jQuery是如此容易使用 xff0c 以至于我们有时候忘记了CSS的存在 我们在使用CSS时 xff0c 几乎不去考虑性能 xff0c 因为它已经是快得不值得再去做什么优化上 的努力 但现实世界中 xff0c JQuery会导致令开发人员
  • echarts主题属性设置

    theme 61 span class hljs comment 全图默认背景 span backgroundColor span class hljs string 39 rgba 0 0 0 0 39 span span class h
  • java keytool证书工具使用小结

    Keytool 是一个Java数据证书的管理工具 Keytool将密钥 xff08 key xff09 和证书 xff08 certificates xff09 存在一个称为keystore的文件中在keystore里 xff0c 包含两种
  • Another app is currently holding the yum lock; waiting for it to exit...

    Another app span class hljs keyword is span currently holding span class hljs keyword the span yum lock waiting span cla
  • Javascript网页打印大全

    目录 普通打印 xff08 整页打 xff09 打印去掉 添加页眉页脚 使用外部控件 方法实现多功能打印 打印背景 普通打印 xff08 整页打 xff09 span class hljs built in window span span
  • centos6.5启动nginx报错

    问题 xff1a nginx emerg socket 80 failed 97 Address family not supported by protocol 解决方案 vim etc nginx conf d default conf
  • echarts和highchart的区别

    echarts 先大体了解一下echarts的历史 xff1a echarts是百度公司前端开发的一个图表库 支持柱状图 饼状图 k线图 map图 热导向图 折线图 主要采用canvas画图 highchart highcharts是国外的
  • vi/vim常用配置和快捷键

    快捷键 命令名功能描述gg将光标移动到文档头部G将光标移动到文档尾部nyy全选文本 xff08 没有全选命令的 xff0c 我的做法就是复制n行 xff0c 只要n大于文本的行数就行 xff09 如何复制文本内容到另一个文件中 使用vim进
  • Cannot resolve module 'child_process'

    ERROR span class hljs keyword in span span class hljs regexp xmlhttprequest span lib XMLHttpRequest js Module not found