webpack报错 记录

3 篇文章 0 订阅
2 篇文章 0 订阅

运行 cloudv3

他这是运行jar包 执行webpack的package.json 到外面的node_modules
webpack -v undefined的时候 先把 dyclound 下的 node-modules删除
然后安装webpack
webpack@4.46.0 -g npm install webpack-cli -g
在这里插入图片描述
1.点击安装webpack 监视后
—报错node-sass------
[npminstall:runscript:error] node-sass@4.5.3 scripts.postinstall run “node scripts/build.js” error: Error [RunScriptError]: Run “C:\Windows\system32\cmd.exe /d /s /c node scripts/build.js” error, exit code 1
at ChildProcess. (D:\software\nvm\v12.20.0\node_modules\cnpm\node_modules\runscript\index.js:96:21)
at ChildProcess.emit (events.js:314:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12) {
stdio: [Object],
exitcode: 1
}

安装node-sass@4.14.1

2.再次点击监视
ERROR in ./cloud-v3/platform/role/platform/main.scss
Module build failed (from ./node_modules/_style-loader@3.3.1@style-loader/dist/cjs.js):
TypeError: this.getOptions is not a function
at Object.loader (E:\dy-clound\node_modules_style-loader@3.3.1@style-loader\dist\index.js:19:24)
@ ./cloud-v3/platform/role/platform/main.js 11:11-33

安装 cnpm install style-loader@2.0.0

3.再次点击监视
好了 大概是这个样子
[./cloud-v3/platform/dyadmin/main.js] 2.96 KiB {dyadmin} [built]
[./cloud-v3/platform/eshop/ads/banner/main.js] 2.04 KiB {eshop/ads/banner} [built]
[./cloud-v3/platform/eshop/tag/list/main.js] 726 bytes {eshop/tag/list} [built]
+ 960 hidden modules

运行new-active
1.初始化-- 监视–
报错

ERROR in ./new_active/src/views/filmViewingCalendar/App.vue (./node_modules/_babel-loader@8.2.3@babel-loader/lib!./node_modules/_vue-loader@14.2.4@vue-loader/lib/selector.js?type=script&index=0!./new_active/src/views/filmViewingCalendar/App.vue)
Module not found: Error: Can't resolve 'html2canvas' in 'E:\dy-clound\new_active\src\views\filmViewingCalendar'
 @ ./new_active/src/views/filmViewingCalendar/App.vue (./node_modules/_babel-loader@8.2.3@babel-loader/lib!./node_modules/_vue-loader@14.2.4@vue-loader/lib/selector.js?type=script&index=0!./new_active/src/views/filmViewingCalendar/App.vue) 57:0-38 113:8-19
 @ ./new_active/src/views/filmViewingCalendar/App.vue
 @ ./new_active/src/views/filmViewingCalendar/main.js

ERROR in ./new_active/src/common/router/index.js
Module not found: Error: Can't resolve 'vue-router' in 'E:\dy-clound\new_active\src\common\router'
 @ ./new_active/src/common/router/index.js 6:0-35 7:8-17 8:19-28
 @ ./new_active/src/common/plugin/href/index.js
 @ ./new_active/src/views/filmViewingCalendar/main.js

安装 vue-wechat-title vue-router html2canvas
cnpm install vue-wechat-title vue-router html2canvas
2.再次运行
再次报错 vue-router
换个vue-router@3.1.3
成功
3.虽然成功 但是这个图标还是读不到
这时候下载 file-loader@2.0.0 注意这个版本可以用 最新的用不了

[./new_active/src/common/plugin/dialog/index.js] 4.92 KiB {filmViewingCalendar/index} [built]
[./new_active/src/common/plugin/href/index.js] 1.96 KiB {filmViewingCalendar/index} [built]
[./new_active/src/common/plugin/lazyImage/index.js] 192 bytes {filmViewingCalendar/index} [built]
[./new_active/src/common/plugin/scrollView/index.js] 186 bytes {filmViewingCalendar/index} [built]
[./new_active/src/common/plugin/swiper/index.js] 663 bytes {filmViewingCalendar/index} [built]
[./new_active/src/common/style/common.scss] 462 bytes {filmViewingCalendar/index} [built]
[./new_active/src/common/utils/config.js] 606 bytes {filmViewingCalendar/index} [built]
[./new_active/src/lib/comp/viewport.js] 3.18 KiB {filmViewingCalendar/index} [built]
[./new_active/src/lib/io/ajax.js] 6.52 KiB {filmViewingCalendar/index} [built]
[./new_active/src/lib/json/query.js] 2.4 KiB {filmViewingCalendar/index} [built]
[./new_active/src/views/filmViewingCalendar/App.vue] 2.17 KiB {filmViewingCalendar/index} [built]
[./new_active/src/views/filmViewingCalendar/main.js] 1.39 KiB {filmViewingCalendar/index} [built]
[./node_modules/_fastclick@1.0.6@fastclick/lib/fastclick.js] 25.4 KiB {filmViewingCalendar/index} [built]
    + 90 hidden modules

**运行nf **

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
 - configuration.entry should be an non-empty object.
   -> Multiple entry bundles are created. The key is the chunk name. The value can be a string or an array.

E:\nf>webpack -v
webpack: 4.46.0
webpack-cli: 4.9.2
webpack-dev-server not installed

1.安装webpack-cli 然后不起作用
在这里插入图片描述
2.开发模式 改版独立 删除nodel-modules下面的webpack webpack-cli

ERROR in ./nf-manage/common/frame/main.scss
Module build failed (from ./node_modules/_style-loader@3.3.1@style-loader/dist/cjs.js):
TypeError: this.getOptions is not a function
    at Object.loader (E:\nf\node_modules\_style-loader@3.3.1@style-loader\dist\index.js:19:24)
 @ ./nf-manage/common/frame/main.js 35:11-33

ERROR in ./nf-manage/common/intermediary/main.scss
Module build failed (from ./node_modules/_style-loader@3.3.1@style-loader/dist/cjs.js):
TypeError: this.getOptions is not a function
    at Object.loader (E:\nf\node_modules\_style-loader@3.3.1@style-loader\dist\index.js:19:24)
 @ ./nf-manage/common/intermediary/main.js 12:11-33

ERROR in ./nf-manage/common/vue-js/plugin/dialog/toast.scss
Module build failed (from ./node_modules/_style-loader@3.3.1@style-loader/dist/cjs.js):
TypeError: this.getOptions is not a function
    at Object.loader (E:\nf\node_modules\_style-loader@3.3.1@style-loader\dist\index.js:19:24)
 @ ./nf-manage/common/vue-js/plugin/dialog/manager.js 13:0-22
 @ ./nf-manage/common/frame/main.js

ERROR in ./nf-manage/common/js/plugin/scss/font.scss
Module build failed (from ./node_modules/_style-loader@3.3.1@style-loader/dist/cjs.js):
TypeError: this.getOptions is not a function
    at Object.loader (E:\nf\node_modules\_style-loader@3.3.1@style-loader\dist\index.js:19:24)
 @ ./nf-manage/common/js/plugin/module/grid.js 12:2-34
 @ ./nf-manage/common/frame/msgDetailDialog.js
 @ ./nf-manage/common/frame/header.js
 @ ./nf-manage/common/frame/main.js

ERROR in ./node_modules/_element-ui@2.15.6@element-ui/lib/theme-chalk/index.css
Module build failed (from ./node_modules/_style-loader@3.3.1@style-loader/dist/cjs.js):
TypeError: this.getOptions is not a function
    at Object.loader (E:\nf\node_modules\_style-loader@3.3.1@style-loader\dist\index.js:19:24)
 @ ./nf-manage/common/frame/useGuide/reportUseGuide.vue (./node_modules/_babel-loader@8.2.4@babel-loader/lib!./node_modules/_vue-loader@14.2.4@vue-loader/lib/selector.js?type=script&index=0!./nf-manage/common/frame/useGuide/reportUseGuide.vue) 18:0-46
 @ ./nf-manage/common/frame/useGuide/reportUseGuide.vue
 @ ./nf-manage/common/frame/moudle.use.config.js
 @ ./nf-manage/common/frame/main.js

3.安装style-loader
cnpm install style-loader@2.0.0

ERROR in ./nf-manage/common/frame/MessageDetail.vue (./node_modules/_babel-loader@8.2.4@babel-loader/lib!./node_modules/_vue-loader@14.2.4@vue-loader/lib/selector.js?type=script&index=0!./nf-manage/common/frame/MessageDetail.vue)
Module not found: Error: Can't resolve 'downloadjs' in 'E:\nf\nf-manage\common\frame'
 @ ./nf-manage/common/frame/MessageDetail.vue (./node_modules/_babel-loader@8.2.4@babel-loader/lib!./node_modules/_vue-loader@14.2.4@vue-loader/lib/selector.js?type=script&index=0!./nf-manage/common/frame/MessageDetail.vue) 36:0-34 83:8-16
 @ ./nf-manage/common/frame/MessageDetail.vue
 @ ./node_modules/_babel-loader@8.2.4@babel-loader/lib!./node_modules/_vue-loader@14.2.4@vue-loader/lib/selector.js?type=script&index=0!./nf-manage/common/frame/MessageList.vue
 @ ./nf-manage/common/frame/MessageList.vue
 @ ./nf-manage/common/frame/main.js

ERROR in ./nf-manage/common/vue-js/components/MoponPagination/index.vue (./node_modules/_babel-loader@8.2.4@babel-loader/lib!./node_modules/_vue-loader@14.2.4@vue-loader/lib/selector.js?type=script&index=0!./nf-manage/common/vue-js/components/MoponPagination/index.vue)
Module not found: Error: Can't resolve 'vuex' in 'E:\nf\nf-manage\common\vue-js\components\MoponPagination'
 @ ./nf-manage/common/vue-js/components/MoponPagination/index.vue (./node_modules/_babel-loader@8.2.4@babel-loader/lib!./node_modules/_vue-loader@14.2.4@vue-loader/lib/selector.js?type=script&index=0!./nf-manage/common/vue-js/components/MoponPagination/index.vue) 25:0-46 49:7-15 84:7-19
 @ ./nf-manage/common/vue-js/components/MoponPagination/index.vue
 @ ./nf-manage/common/vue-js/components sync \.vue$
 @ ./nf-manage/common/vue-js/components/index.js
  1. 安装vuex downloadjs
  2. 安装
    cnpm install -g vue-cli@2.6.0
    cnpm install vue-cli@2.6.0 -D
    cnpm install vue@2.6.0
ERROR in ./nf-manage/common/vue-js/components/MoponPagination/index.vue (./node_modules/_babel-loader@8.2.4@babel-loader/lib!./node_modules/_vue-loader@14.2.4@vue-loader/lib/selector.js?type=script&index=0!./nf-manage/common/vue-js/components/MoponPagination/index.vue)
Module not found: Error: Can't resolve 'vuex' in 'E:\nf\nf-manage\common\vue-js\components\MoponPagination'
 @ ./nf-manage/common/vue-js/components/MoponPagination/index.vue (./node_modules/_babel-loader@8.2.4@babel-loader/lib!./node_modules/_vue-loader@14.2.4@vue-loader/lib/selector.js?type=script&index=0!./nf-manage/common/vue-js/components/MoponPagination/index.vue) 25:0-46 49:7-15 84:7-19
 @ ./nf-manage/common/vue-js/components/MoponPagination/index.vue
 @ ./nf-manage/common/vue-js/components sync \.vue$
 @ ./nf-manage/common/vue-js/components/index.js

cnpm install vuex@3.5.1

  1. ok

其他

script :
vue里面的每个命令都是shell脚本 dev build

通过npm来 run 运行 dev 开发模式
build dev shell脚本命令

dependencies:
项目依赖库 至始至终都需要的

devDependencies:
开发需要的依赖 开发完后可以不需要

engines
引擎

npm init 初始化package.json

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值