We've moved discussions to Discord

[SOLVED] UnhandledPromiseRejectionWarning: Error: "version" is a required argument

Lucas Carlson
I just upgraded to the newest Jumpstart Pro and now I can't compile assets...

$ bundle exec rake assets:precompile

yarn install v1.21.1
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@2.1.3: The platform "linux" is incompatible with this module.
info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@1.2.13: The platform "linux" is incompatible with this module.
info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 3.83s.
Compiling...
Compiled all packs in /var/www/cloudenv/releases/20210114232417/public/packs
(node:416) UnhandledPromiseRejectionWarning: Error: "version" is a required argument.
    at Object.getArg (/var/www/cloudenv/releases/20210114232417/node_modules/source-map/lib/util.js:24:11)
    at new BasicSourceMapConsumer (/var/www/cloudenv/releases/20210114232417/node_modules/source-map/lib/source-map-consumer.js:294:22)
    at new SourceMapConsumer (/var/www/cloudenv/releases/20210114232417/node_modules/source-map/lib/source-map-consumer.js:22:7)
    at SourceMapSource.node (/var/www/cloudenv/releases/20210114232417/node_modules/webpack/node_modules/webpack-sources/lib/SourceMapSource.js:193:4)
    at exports.getSourceAndMap (/var/www/cloudenv/releases/20210114232417/node_modules/webpack/node_modules/webpack-sources/lib/helpers.js:20:27)
    at SourceMapSource.sourceAndMap (/var/www/cloudenv/releases/20210114232417/node_modules/webpack/node_modules/webpack-sources/lib/SourceMapSource.js:184:10)
    at getTaskForFile (/var/www/cloudenv/releases/20210114232417/node_modules/webpack/lib/SourceMapDevToolPlugin.js:78:30)
    at /var/www/cloudenv/releases/20210114232417/node_modules/webpack/lib/SourceMapDevToolPlugin.js:266:22
    at /var/www/cloudenv/releases/20210114232417/node_modules/webpack/lib/Cache.js:93:5
    at Hook.eval [as callAsync] (eval at create (/var/www/cloudenv/releases/20210114232417/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:4:1)
(node:416) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:416) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Lucas Carlson
For anyone else who is having this problem, see here: https://gitlab.com/gorails/jumpstart-pro/-/issues/92

Comment from Chris Oliver:

My fix was to add "devtool: false" to config/webpack/base.js (or production.js) 

A deploy with that should skip sourcemaps and fix it. It's really a bug in Webpacker 6 at the moment as it shouldn't continue running even though it clearly had an error. So much has been changing with that gem! 😅

Notifications
You’re not receiving notifications from this thread.