Fresh deployment to Heroku failing

BV Satyaram
I have started a new project by cloning from the master repo. I didn't make major changes. Everything works well on my machine. I get the error Cannot find module '@babel/helper-builder-binary-assignment-operator-visitor' when I try to deploy to Heroku using simple "git push heroku master". The first deployment itself failed. So, I do not have access to bash to delete the `node_modules` folder and retry.

Here is the stacktrace.

remote:        Compiling...
remote:        Compilation failed:
remote:        assets by status 6.91 KiB [cached] 4 assets
remote:        Entrypoint administrate = js/runtime-a761cbc336ae9054c126.js js/administrate-d9c9831076b2d325114f.js
remote:        Entrypoint application = js/runtime-a761cbc336ae9054c126.js js/application-98e9fb43c8717c51f25c.js
remote:        runtime modules 2.68 KiB 2 modules
remote:        modules with errors 78 bytes [errors]
remote:          ./app/javascript/packs/administrate.js 39 bytes [built] [code generated] [1 error]
remote:          ./app/javascript/packs/application.js 39 bytes [built] [code generated] [1 error]
remote:        
remote:        ERROR in ./app/javascript/packs/administrate.js
remote:        Module build failed (from ./node_modules/babel-loader/lib/index.js):
remote:        Error: [BABEL]: Cannot find module '@babel/helper-builder-binary-assignment-operator-visitor'
remote:        Require stack:
remote:        - /tmp/build_b39f6db3/node_modules/@babel/plugin-transform-exponentiation-operator/lib/index.js
remote:        - /tmp/build_b39f6db3/node_modules/@babel/preset-env/lib/available-plugins.js
remote:        - /tmp/build_b39f6db3/node_modules/@babel/preset-env/lib/plugins-compat-data.js
remote:        - /tmp/build_b39f6db3/node_modules/@babel/preset-env/lib/normalize-options.js
remote:        - /tmp/build_b39f6db3/node_modules/@babel/preset-env/lib/index.js
remote:        - /tmp/build_b39f6db3/node_modules/@babel/core/lib/config/files/module-types.js
remote:        - /tmp/build_b39f6db3/node_modules/@babel/core/lib/config/files/configuration.js
remote:        - /tmp/build_b39f6db3/node_modules/@babel/core/lib/config/files/index.js
remote:        - /tmp/build_b39f6db3/node_modules/@babel/core/lib/index.js
remote:        - /tmp/build_b39f6db3/node_modules/babel-loader/lib/index.js
remote:        - /tmp/build_b39f6db3/node_modules/loader-runner/lib/loadLoader.js
remote:        - /tmp/build_b39f6db3/node_modules/loader-runner/lib/LoaderRunner.js
remote:        - /tmp/build_b39f6db3/node_modules/webpack/lib/NormalModule.js
remote:        - /tmp/build_b39f6db3/node_modules/webpack/lib/index.js
remote:        - /tmp/build_b39f6db3/node_modules/webpack-cli/lib/webpack-cli.js
remote:        - /tmp/build_b39f6db3/node_modules/webpack-cli/lib/bootstrap.js
remote:        - /tmp/build_b39f6db3/node_modules/webpack-cli/bin/cli.js
remote:        - /tmp/build_b39f6db3/node_modules/webpack/bin/webpack.js (While processing: /tmp/build_b39f6db3/node_modules/@babel/preset-env/lib/index.js)
remote:            at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)
remote:            at Function.Module._load (internal/modules/cjs/loader.js:862:27)
remote:            at Module.require (internal/modules/cjs/loader.js:1042:19)
remote:            at require (/tmp/build_b39f6db3/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
remote:            at Object.<anonymous> (/tmp/build_b39f6db3/node_modules/@babel/plugin-transform-exponentiation-operator/lib/index.js:10:76)
remote:            at Module._compile (/tmp/build_b39f6db3/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
remote:            at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
remote:            at Module.load (internal/modules/cjs/loader.js:1000:32)
remote:            at Function.Module._load (internal/modules/cjs/loader.js:899:14)
remote:            at Module.require (internal/modules/cjs/loader.js:1042:19)
remote:        
remote:        ERROR in ./app/javascript/packs/application.js
remote:        Module build failed (from ./node_modules/babel-loader/lib/index.js):
remote:        Error: [BABEL]: Cannot find module '@babel/helper-builder-binary-assignment-operator-visitor'
remote:        Require stack:
remote:        - /tmp/build_b39f6db3/node_modules/@babel/plugin-transform-exponentiation-operator/lib/index.js
remote:        - /tmp/build_b39f6db3/node_modules/@babel/preset-env/lib/available-plugins.js
remote:        - /tmp/build_b39f6db3/node_modules/@babel/preset-env/lib/plugins-compat-data.js
remote:        - /tmp/build_b39f6db3/node_modules/@babel/preset-env/lib/normalize-options.js
remote:        - /tmp/build_b39f6db3/node_modules/@babel/preset-env/lib/index.js
remote:        - /tmp/build_b39f6db3/node_modules/@babel/core/lib/config/files/module-types.js
remote:        - /tmp/build_b39f6db3/node_modules/@babel/core/lib/config/files/configuration.js
remote:        - /tmp/build_b39f6db3/node_modules/@babel/core/lib/config/files/index.js
remote:        - /tmp/build_b39f6db3/node_modules/@babel/core/lib/index.js
remote:        - /tmp/build_b39f6db3/node_modules/babel-loader/lib/index.js
remote:        - /tmp/build_b39f6db3/node_modules/loader-runner/lib/loadLoader.js
remote:        - /tmp/build_b39f6db3/node_modules/loader-runner/lib/LoaderRunner.js
remote:        - /tmp/build_b39f6db3/node_modules/webpack/lib/NormalModule.js
remote:        - /tmp/build_b39f6db3/node_modules/webpack/lib/index.js
remote:        - /tmp/build_b39f6db3/node_modules/webpack-cli/lib/webpack-cli.js
remote:        - /tmp/build_b39f6db3/node_modules/webpack-cli/lib/bootstrap.js
remote:        - /tmp/build_b39f6db3/node_modules/webpack-cli/bin/cli.js
remote:        - /tmp/build_b39f6db3/node_modules/webpack/bin/webpack.js (While processing: /tmp/build_b39f6db3/node_modules/@babel/preset-env/lib/index.js)
remote:            at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)
remote:            at Function.Module._load (internal/modules/cjs/loader.js:862:27)
remote:            at Module.require (internal/modules/cjs/loader.js:1042:19)
remote:            at require (/tmp/build_b39f6db3/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
remote:            at Object.<anonymous> (/tmp/build_b39f6db3/node_modules/@babel/plugin-transform-exponentiation-operator/lib/index.js:10:76)
remote:            at Module._compile (/tmp/build_b39f6db3/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
remote:            at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
remote:            at Module.load (internal/modules/cjs/loader.js:1000:32)
remote:            at Function.Module._load (internal/modules/cjs/loader.js:899:14)
remote:            at Module.require (internal/modules/cjs/loader.js:1042:19)
remote:        
remote:        webpack 5.24.4 compiled with 2 errors in 857 ms
remote:        
remote: 
remote:  !
remote:  !     Precompiling assets failed.
remote:  !
remote:  !     Push rejected, failed to compile Ruby app.
remote: 
remote:  !     Push failed
BV Satyaram
Discussion going at: https://gitlab.com/gorails/jumpstart-pro/-/issues/116
Notifications
You’re not receiving notifications from this thread.
© 2022 GoRails, LLC