获取“抛出新错误('已调用回调')”

zqry0prt  于 2021-09-23  发布在  Java
关注(0)|答案(1)|浏览(589)

当我运行npm run build(以前多次构建该程序)时,我突然发现了这个奇怪的错误。

C:\Users\PomoJota\node_modules\neo-async\async.js:16
    throw new Error('Callback was already called.');
    ^

Error: Callback was already called.
    at throwError (C:\Users\PomoJota\node_modules\neo-async\async.js:16:11)
    at C:\Users\PomoJota\node_modules\neo-async\async.js:2818:7
    at processTicksAndRejections (node:internal/process/task_queues:75:11)
npm ERR! code 1
npm ERR! path C:\Users\pomojota
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c vue-cli-service build

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Jean\AppData\Local\npm-cache\_logs\2021-07-27T03_46_08_599Z-debug.log

调试日志:

0 verbose cli [
0 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
0 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
0 verbose cli   'run',
0 verbose cli   'build'
0 verbose cli ]
1 info using npm@7.3.0
2 info using node@v15.5.1
3 timing config:load:defaults Completed in 4ms
4 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 3ms
5 timing config:load:builtin Completed in 3ms
6 timing config:load:cli Completed in 2ms
7 timing config:load:env Completed in 1ms
8 timing config:load:file:C:\Users\pomojota\.npmrc Completed in 8ms
9 timing config:load:project Completed in 10ms
10 timing config:load:file:C:\Users\Jean\.npmrc Completed in 4ms
11 timing config:load:user Completed in 4ms
12 timing config:load:file:C:\Users\Jean\AppData\Roaming\npm\etc\npmrc Completed in 1ms
13 timing config:load:global Completed in 1ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 0ms
16 timing config:load:setUserAgent Completed in 1ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 29ms
19 verbose npm-session b0696214e645b814
20 timing npm:load Completed in 53ms
21 timing command:run-script Completed in 8397ms
22 verbose stack Error: command failed
22 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\promise-spawn\index.js:64:27)
22 verbose stack     at ChildProcess.emit (node:events:376:20)
22 verbose stack     at maybeClose (node:internal/child_process:1063:16)
22 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:295:5)
23 verbose pkgid pomojota@0.1.0
24 verbose cwd C:\Users\pomojota
25 verbose Windows_NT 10.0.19042
26 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
27 verbose node v15.5.1
28 verbose npm  v7.3.0
29 error code 1
30 error path C:\Users\pomojota
31 error command failed
32 error command C:\Windows\system32\cmd.exe /d /s /c vue-cli-service build
33 verbose exit 1

my package.json:

{
  "name": "pomojota",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint",
    "deploy": "sh deploy.sh"
  },
  "dependencies": {
    "core-js": "^3.6.5",
    "vue": "^3.0.0"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "~4.5.0",
    "@vue/cli-plugin-eslint": "~4.5.0",
    "@vue/cli-service": "~4.5.0",
    "@vue/compiler-sfc": "^3.0.0",
    "babel-eslint": "^10.1.0",
    "eslint": "^6.7.2",
    "eslint-plugin-vue": "^7.0.0"
  },
  "eslintConfig": {
    "root": true,
    "env": {
      "node": true
    },
    "extends": [
      "plugin:vue/vue3-essential",
      "eslint:recommended"
    ],
    "parserOptions": {
      "parser": "babel-eslint"
    },
    "rules": {}
  },
  "browserslist": [
    "> 1%",
    "last 2 versions",
    "not dead"
  ]
}

我完全迷路了,甚至不知道从哪里开始。作为参考,我按照本指南将vue.js应用程序部署到github页面:https://www.youtube.com/watch?v=i_xbw-fslkk和它一直工作良好,直到今天,当我得到这个错误的蓝色。

a8jjtwal

a8jjtwal1#

嗯,原来我找到了这个帖子https://forum.vuejs.org/t/vue-cli-service-build/83951 并简单地加上 module.exports = { css: { extract: false } }vue.config.js .

相关问题