Heroku构建失败:网页包丑陋和tiptap(用于vue)版本不兼容?
几个月后,我重新运行了heroku slug的构建,但令人惊讶的是它失败了。。。这似乎是webpack uglify插件和tiptap editor之间的兼容性问题。 我试图增加和减少tiptap版本,但效果不佳。 这是my package.json:Heroku构建失败:网页包丑陋和tiptap(用于vue)版本不兼容?,heroku,webpack,tiptap,Heroku,Webpack,Tiptap,几个月后,我重新运行了heroku slug的构建,但令人惊讶的是它失败了。。。这似乎是webpack uglify插件和tiptap editor之间的兼容性问题。 我试图增加和减少tiptap版本,但效果不佳。 这是my package.json: { "name": "rajit-web", "version": "1.1.0", "description": "Raj
{
"name": "rajit-web",
"version": "1.1.0",
"description": "Rajit Bot web interface",
"author": "coboye",
"private": true,
"scripts": {
"devfe": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"build": "webpack --progress --config build/webpack.dev.conf.js",
"start": "npm run build",
"prod": "npm run heroku-postbuild",
"open": "start http://localhost:80",
"heroku-postbuild": "webpack -p --progress --config build/webpack.prod.conf.js"
},
"dependencies": {
"body-parser": "^1.19.0",
"btoa": "^1.2.1",
"connect-history-api-fallback": "^1.6.0",
"cookie-parser": "^1.4.5",
"dotenv": "^8.2.0",
"express": "^4.17.1",
"express-session": "^1.17.1",
"match-all": "^1.2.6",
"memory-cache": "^0.2.0",
"moment": "^2.29.1",
"moment-timezone": "^0.5.31",
"mongodb": "^3.6.2",
"node-fetch": "^2.6.0",
"sass-loader": "^8.0.2",
"tiptap": "^1.30.0",
"tiptap-extensions": "^1.33.1",
"tiptap-vuetify": "^2.24.0",
"vue": "^2.6.12",
"vue-router": "^3.4.6",
"vuetify": "^2.3.14",
"vuex": "^3.5.1",
"youtube-audio-stream": "^0.3.6"
},
"devDependencies": {
"autoprefixer": "^7.1.2",
"babel-core": "^6.22.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^7.1.1",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-plugin-transform-vue-jsx": "^3.5.0",
"babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0",
"chalk": "^2.0.1",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.0",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.4",
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1",
"laravel-mix": "^5.0.0",
"node-notifier": "^5.1.2",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.2.0",
"portfinder": "^1.0.28",
"postcss-import": "^11.0.0",
"postcss-loader": "^2.0.8",
"postcss-url": "^7.2.1",
"rimraf": "^2.6.0",
"semver": "^5.3.0",
"shelljs": "^0.7.6",
"url-loader": "^0.5.8",
"vue-loader": "^13.3.0",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.6.12",
"webpack": "^3.12.0",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-server": "^2.9.1",
"uglifyjs-webpack-plugin": "1.1.0",
"webpack-merge": "^4.1.0"
},
"engines": {
"node": "14.13.1",
"npm": "6.14.8"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
有什么建议吗
-----> 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,"id":"data-v-3637b3d8","scoped":false,"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,"id":"data-v-3637b3d8","scoped":false,"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","scoped":false,"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","scoped":false,"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","scoped":false,"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","scoped":false,"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","scoped":false,"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","scoped":false,"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","scoped":false,"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","scoped":false,"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","scoped":false,"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