如何解决Heroku构建失败:Webpack uglify和Tiptap用于vue版本不兼容?
几个月后,我重新运行了heroku slug的构建,令人惊讶的是它失败了……这似乎是webpack uglify插件和Tiptap编辑器之间的兼容性问题。 我尝试增加和减少速记版本,但效果不佳。 这是我的package.json:
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONfig_LOGLEVEL=error
NODE_ENV=production
NODE_MODULES_CACHE=false
NODE_VERBOSE=false
-----> Installing binaries
engines.node (package.json): 14.13.1
engines.npm (package.json): 6.14.8
Resolving node version 14.13.1...
Downloading and installing node 14.13.1...
npm 6.14.8 already installed with node
-----> Restoring cache
Caching has been disabled because NODE_MODULES_CACHE=false
-----> Installing dependencies
Installing node modules (package.json)
> core-js@2.6.11 postinstall /tmp/build_18c33a4a/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
> ejs@2.7.4 postinstall /tmp/build_18c33a4a/node_modules/ejs
> node ./postinstall.js
> uglifyjs-webpack-plugin@0.4.6 postinstall /tmp/build_18c33a4a/node_modules/webpack/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js
added 1715 packages from 1087 contributors and audited 1724 packages in 61.036s
49 packages are looking for funding
run `npm fund` for details
found 15 vulnerabilities (3 low,7 moderate,5 high)
run `npm audit fix` to fix them,or `npm audit` for details
-----> Build
Detected both "build" and "heroku-postbuild" scripts
Running heroku-postbuild
> rajit-web@1.1.0 heroku-postbuild /tmp/build_18c33a4a
> webpack -p --progress --config build/webpack.prod.conf.js
Hash: a39aefc8ab899753118c
Version: webpack 3.12.0
Time: 61682ms
Asset Size Chunks Chunk Names
static/js/vendor.cab608f10c9091a6f789.js 971 kB 0 [emitted] [big] vendor
static/js/app.82d74252da31edcd377f.js 72.5 kB 1 [emitted] app
static/js/manifest.2ae2e69a05c33dfc65f8.js 857 bytes 2 [emitted] manifest
static/css/app.f7fa4b9313a493dd09f68e4516ae52ed.css 625 kB 1 [emitted] [big] app
static/css/app.f7fa4b9313a493dd09f68e4516ae52ed.css.map 830 kB [emitted]
static/js/vendor.cab608f10c9091a6f789.js.map 4.14 MB 0 [emitted] vendor
static/js/app.82d74252da31edcd377f.js.map 348 kB 1 [emitted] app
static/js/manifest.2ae2e69a05c33dfc65f8.js.map 5.92 kB 2 [emitted] manifest
index.html 3.12 kB [emitted]
static/css/theme.css 141 kB [emitted]
static/discord.png 14.2 kB [emitted]
static/favicon.ico 17 kB [emitted]
static/icon/hl_0.png 700 bytes [emitted]
static/icon/hl_a.png 5.77 kB [emitted]
static/icon/hl_c.png 3.21 kB [emitted]
static/icon/hl_l.png 5.06 kB [emitted]
static/icon/radio-off.svg 1.14 kB [emitted]
static/icon/radio-on.svg 1.2 kB [emitted]
static/icon/whl_0.png 845 bytes [emitted]
static/icon/whl_a.png 10.6 kB [emitted]
static/icon/whl_c.png 5.16 kB [emitted]
static/icon/whl_l.png 8.54 kB [emitted]
static/img/actors/121a852b2f9b48a1.png 98.6 kB [emitted]
static/img/actors/1fd7558df5dd650e.png 105 kB [emitted]
static/img/actors/2c0d1bbd84dc9c22.png 85.4 kB [emitted]
static/img/actors/2d2835b36c5257d6.png 95.8 kB [emitted]
static/img/actors/319ddda8ef0bc741.png 108 kB [emitted]
static/img/actors/5d5a1bb09bc46269.png 112 kB [emitted]
static/img/actors/75282b2c39923d1b.png 55.2 kB [emitted]
static/img/actors/7c327bb63f6cd586.png 131 kB [emitted]
static/img/actors/80b6a4b5787962f9.png 167 kB [emitted]
static/img/actors/b7a73a2f44a5ec97.png 190 kB [emitted]
static/img/actors/d0408fdcfc3e236c.png 113 kB [emitted]
static/img/actors/e421e4f30034c4f8.png 161 kB [emitted]
static/img/actors/ef0ed6c9c0b163d6.png 114 kB [emitted]
static/img/actors/f3c7f9ea99ad9d1b.png 237 kB [emitted]
static/img/actors/f3f799649b82245c.png 101 kB [emitted]
static/img/actors/f442ee01ac751606.png 62.5 kB [emitted]
static/img/actors/orso.png 85.2 kB [emitted]
static/img/actors/placeholder-f.png 4.83 kB [emitted]
static/img/actors/placeholder-m.png 8.57 kB [emitted]
static/img/avatar.png 3.02 kB [emitted]
static/img/clan/assamita_anticlan.png 45.7 kB [emitted]
static/img/clan/assamita.png 45.7 kB [emitted]
static/img/clan/brujah.png 104 kB [emitted]
static/img/clan/city_gangrel.png 25.4 kB [emitted]
static/img/clan/figlie_della_cacofonia.png 29.4 kB [emitted]
static/img/clan/gangrel_di_citta.png 25.4 kB [emitted]
static/img/clan/gangrel.png 25.4 kB [emitted]
static/img/clan/lasombra_anticlan.png 22 kB [emitted]
static/img/clan/malkavian.png 22.9 kB [emitted]
static/img/clan/salubri.png 13.6 kB [emitted]
static/img/clan/toreador.png 26.7 kB [emitted]
static/img/clan/tremere.png 11.1 kB [emitted]
static/img/clan/ventrue.png 12.2 kB [emitted]
static/img/exp.png 5.05 kB [emitted]
static/rajit.png 132 kB [emitted]
static/tabletop.png 10.6 kB [emitted]
static/img/parallax.jpg 139 kB [emitted]
static/img/mask.png 2.12 MB [emitted] [big]
[Bs1s] ./node_modules/extract-text-webpack-plugin/dist/loader.js?{"omit":1,"remove":true}!./node_modules/vue-style-loader!./node_modules/css-loader?{"sourceMap":true}!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-3637b3d8","scoped":false,"hasInlineConfig":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/App.vue 41 bytes {1} [built]
[DuR2] (webpack)/buildin/global.js 509 bytes {0} [built]
[NHnr] ./src/main.js + 40 modules 144 kB {1} [built]
+ 123 hidden modules
ERROR in ./node_modules/tiptap/dist/tiptap.esm.js
Module parse Failed: Unexpected token (126:23)
You may need an appropriate loader to handle this file type.
| } = this.node;
| const pos = this.getPos();
| const newAttrs = { ...this.node.attrs,| ...attrs
| };
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/ActorNotes.vue 147:0-62
@ ./src/components/ActorNotes.vue
@ ./src/main.js
ERROR in ./node_modules/tiptap-extensions/dist/extensions.esm.js
Module parse Failed: Unexpected token (175:15)
You may need an appropriate loader to handle this file type.
| const to = from + node.text.length;
| startPos = to;
| return { ...node,| from,| to
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/ActorNotes.vue 148:0-203
@ ./src/components/ActorNotes.vue
@ ./src/main.js
Child html-webpack-plugin for "index.html":
1 asset
[3IRH] (webpack)/buildin/module.js 517 bytes {0} [built]
[DuR2] (webpack)/buildin/global.js 509 bytes {0} [built]
[XPyR] ./node_modules/html-webpack-plugin/lib/loader.js!./index.html 4.01 kB {0} [built]
+ 1 hidden module
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js?{"sourceMap":true}!node_modules/vue-loader/lib/style-compiler/index.js?{"vue":true,"hasInlineConfig":false}!node_modules/vue-loader/lib/selector.js?type=styles&index=0!src/App.vue:
[Gpp6] ./node_modules/css-loader?{"sourceMap":true}!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"hasInlineConfig":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/App.vue
1.89 kB {0} [built]
+ 1 hidden module
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js?{"sourceMap":true}!node_modules/vue-loader/lib/style-compiler/index.js?{"vue":true,"id":"data-v-343c1670","scoped":true,"hasInlineConfig":false}!node_modules/vue-loader/lib/selector.js?type=styles&index=0!src/components/DialogConfirm.vue:
2 modules
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js?{"sourceMap":true}!node_modules/vue-loader/lib/style-compiler/index.js?{"vue":true,"id":"data-v-198c50df","hasInlineConfig":false}!node_modules/vue-loader/lib/selector.js?type=styles&index=0!src/components/Home.vue:
2 modules
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js?{"sourceMap":true}!node_modules/vue-loader/lib/style-compiler/index.js?{"vue":true,"id":"data-v-586c9dbc","hasInlineConfig":false}!node_modules/vue-loader/lib/selector.js?type=styles&index=0!src/components/Dashboard.vue:
2 modules
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js?{"sourceMap":true}!node_modules/vue-loader/lib/style-compiler/index.js?{"vue":true,"id":"data-v-0899e7a6","hasInlineConfig":false}!node_modules/vue-loader/lib/selector.js?type=styles&index=0!src/components/ActorPage.vue:
2 modules
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js?{"sourceMap":true}!node_modules/vue-loader/lib/style-compiler/index.js?{"vue":true,"id":"data-v-64537942","hasInlineConfig":false}!node_modules/vue-loader/lib/selector.js?type=styles&index=0!src/components/ActorNotes.vue:
2 modules
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js?{"sourceMap":true}!node_modules/vue-loader/lib/style-compiler/index.js?{"vue":true,"id":"data-v-8e0c97a8","hasInlineConfig":false}!node_modules/vue-loader/lib/selector.js?type=styles&index=0!src/components/ActorInventory.vue:
2 modules
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js?{"sourceMap":true}!node_modules/vue-loader/lib/style-compiler/index.js?{"vue":true,"id":"data-v-44612867","hasInlineConfig":false}!node_modules/vue-loader/lib/selector.js?type=styles&index=0!src/components/ActorCard.vue:
2 modules
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js?{"sourceMap":true}!node_modules/vue-loader/lib/style-compiler/index.js?{"vue":true,"id":"data-v-5d235921","hasInlineConfig":false}!node_modules/vue-loader/lib/selector.js?type=styles&index=0!src/components/PlayerStatus.vue:
2 modules
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js?{"sourceMap":true}!node_modules/vue-loader/lib/style-compiler/index.js?{"vue":true,"id":"data-v-6faa1f05","hasInlineConfig":false}!node_modules/vue-loader/lib/selector.js?type=styles&index=0!src/components/ActorSheet.vue:
2 modules
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js?{"sourceMap":true}!node_modules/vue-loader/lib/style-compiler/index.js?{"vue":true,"id":"data-v-13ea8d14","hasInlineConfig":false}!node_modules/vue-loader/lib/selector.js?type=styles&index=0!src/components/DotsBag.vue:
2 modules
Child extract-text-webpack-plugin node_modules/extract-text-webpack-plugin/dist node_modules/css-loader/index.js??ref--5-2!node_modules/postcss-loader/lib/index.js??ref--5-3!node_modules/vuetify/dist/vuetify.min.css:
2 modules npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! rajit-web@1.1.0 heroku-postbuild: `webpack -p --progress --config build/webpack.prod.conf.js` npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the rajit-web@1.1.0 heroku-postbuild script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /tmp/npmcache.cM0Sc/_logs/2020-10-14T20_52_47_873Z-debug.log
-----> Build Failed
We're sorry this build is failing! You can troubleshoot common issues here:
https://devcenter.heroku.com/articles/troubleshooting-node-deploys
If you're stuck,please submit a ticket so we can help:
https://help.heroku.com/
love,Heroku
! Push rejected,Failed to compile Node.js app. ! Push Failed
还有构建日志
datefromparts(year(birthdate),4,1)
有什么建议吗?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。