我在尝试解决以下问题时遇到了一些困难,这导致我的构建失败。
grunt_default 任务失败,它抱怨 micromatch 中的语法错误,我认为这与版本冲突有关,但我找不到解决方案:
12:49:40 > Task :service:grunt_default FAILED
12:49:40 ..main/resources/static/node_modules/liftup/node_modules/micromatch/index.js:44
12:49:40 let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
12:49:40 ^^^
12:49:40
12:49:40 SyntaxError: Unexpected token ...
12:49:40 at createScript (vm.js:56:10)
12:49:40 at Object.runInThisContext (vm.js:97:10)
12:49:40 at Module._compile (module.js:549:28)
12:49:40 at Object.Module._extensions..js (module.js:586:10)
12:49:40 at Module.load (module.js:494:32)
12:49:40 at tryModuleLoad (module.js:453:12)
12:49:40 at Function.Module._load (module.js:445:3)
12:49:40 at Module.require (module.js:504:17)
12:49:40 at require (internal/module.js:20:19)
12:49:40 at Object.<anonymous> (..main/resources/static/node_modules/liftup/node_modules/findup-sync/index.js:12:10)
依赖微匹配列表:
ubuntu12#: npm list micromatch
`-- karma@1.7.1
`-- chokidar@1.7.0
+-- anymatch@1.3.2
| `-- micromatch@2.3.11
`-- readdirp@2.2.1
`-- micromatch@3.1.10
这是我的 package.json :
"devDependencies": {
"connect-modrewrite": "^0.10.1",
"grunt": "~1.0.1",
"grunt-autoprefixer": "~3.0.4",
"grunt-cdnify": "^1.0.2",
"grunt-concurrent": "~2.3.1",
"grunt-contrib-clean": "~1.1.0",
"grunt-contrib-concat": "~1.0.1",
"grunt-contrib-connect": "~1.0.2",
"grunt-contrib-copy": "~1.0.0",
"grunt-contrib-cssmin": "~2.2.1",
"grunt-contrib-htmlmin": "~2.4.0",
"grunt-contrib-jshint": "~1.1.0",
"grunt-contrib-uglify": "~3.1.0",
"grunt-contrib-watch": "~1.0.0",
"grunt-filerev": "~2.3.1",
"grunt-karma": "^2.0.0",
"grunt-newer": "~1.3.0",
"grunt-ng-annotate": "~3.0.0",
"grunt-svgmin": "~4.0.0",
"grunt-usemin": "~3.1.1",
"grunt-port-pick": "^1.5.3",
"grunt-wiredep": "~3.0.1",
"jshint-stylish": "~2.2.1",
"karma": "^1.7.1",
"karma-coverage": "^1.1.1",
"karma-jasmine": "^1.1.0",
"karma-junit-reporter": "^1.2.0",
"karma-phantomjs-launcher": "~1.0.4",
"load-grunt-tasks": "~3.5.2",
"time-grunt": "~1.4.0",
"grunt-jscs": "^3.0.1",
"grunt-sonar-runner": "^2.4.8",
"jasmine-core": "^2.8.0",
"serve-static": "^1.12.4",
"grunt-angular-templates": "~1.1.0",
"bower": "^1.8.4",
"highcharts-3d": "^0.1.7"
},
"engines": {
"node": ">=0.12.8"
},
"scripts": {
"test": "grunt test"
}
您是否熟悉这个问题?
答案 0 :(得分:0)
我发现了这个:
[https://github.com/alfredosalzillo/rollup-plugin-multi-input/issues/12][1]
显然与节点版本有关。它需要大于 8。