Migrating webpack app from netlify but keep getting build error on Vercel

Build already works on Netlify but not working on Vercel.

[21:59:31.135] Running build in Washington, D.C., USA (East) – iad1
[21:59:31.234] Cloning github.com// (Branch: main, Commit: de8d782)
[21:59:31.594] Previous build cache not available
[21:59:35.064] Cloning completed: 3.829s
[21:59:36.375] Running “vercel build”
[21:59:37.465] Vercel CLI 37.12.0
[21:59:38.535] Running “install” command: npm install
[21:59:41.757] npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
[21:59:41.819] npm warn deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
[21:59:42.040] npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
[21:59:42.071] npm warn deprecated npmlog@5.0.1: This package is no longer supported.
[21:59:42.141] npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
[21:59:42.166] npm warn deprecated q@1.5.1: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
[21:59:42.166] npm warn deprecated
[21:59:42.166] npm warn deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
[21:59:42.381] npm warn deprecated domexception@4.0.0: Use your platform’s native DOMException instead
[21:59:42.464] npm warn deprecated abab@2.0.6: Use your platform’s native atob() and btoa() methods instead
[21:59:42.488] npm warn deprecated gauge@3.0.2: This package is no longer supported.
[21:59:42.534] npm warn deprecated are-we-there-yet@2.0.0: This package is no longer supported.
[21:59:45.394] npm warn deprecated @uploadcare/blocks@0.33.2: The @uploadcare/blocks package has been renamed to @uploadcare/file-uploader. Please migrate to the new package to continue receiving updates and support. You can find the migration guide here: Migration guide for @uploadcare/file-uploader v1.x — Uploadcare docs
[21:59:52.806]
[21:59:52.807] added 360 packages, and audited 808 packages in 14s
[21:59:52.808]
[21:59:52.808] 114 packages are looking for funding
[21:59:52.808] run npm fund for details
[21:59:52.809]
[21:59:52.809] found 0 vulnerabilities
[21:59:53.574]
[21:59:53.574] > frame-option-select@1.0.0 build
[21:59:53.575] > webpack --mode production
[21:59:53.576]
[21:59:53.817] [webpack-cli] Error: Cannot find module ‘…/util/mergeScope’
[21:59:53.817] Require stack:
[21:59:53.818] - /vercel/path0/node_modules/webpack/lib/javascript/JavascriptModulesPlugin.js
[21:59:53.818] - /vercel/path0/node_modules/webpack/lib/WebpackOptionsApply.js
[21:59:53.818] - /vercel/path0/node_modules/webpack/lib/webpack.js
[21:59:53.818] - /vercel/path0/node_modules/webpack/lib/index.js
[21:59:53.818] - /vercel/path0/node_modules/webpack-cli/lib/webpack-cli.js
[21:59:53.818] - /vercel/path0/node_modules/webpack-cli/lib/bootstrap.js
[21:59:53.818] - /vercel/path0/node_modules/webpack-cli/bin/cli.js
[21:59:53.818] - /vercel/path0/node_modules/webpack/bin/webpack.js
[21:59:53.818] at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
[21:59:53.818] at Module._load (node:internal/modules/cjs/loader:1051:27)
[21:59:53.818] at Module.require (node:internal/modules/cjs/loader:1311:19)
[21:59:53.819] at require (node:internal/modules/helpers:179:18)
[21:59:53.819] at Object. (/vercel/path0/node_modules/webpack/lib/javascript/JavascriptModulesPlugin.js:35:44)
[21:59:53.819] at Module._compile (node:internal/modules/cjs/loader:1469:14)
[21:59:53.819] at Module._extensions…js (node:internal/modules/cjs/loader:1548:10)
[21:59:53.819] at Module.load (node:internal/modules/cjs/loader:1288:32)
[21:59:53.819] at Module._load (node:internal/modules/cjs/loader:1104:12)
[21:59:53.819] at Module.require (node:internal/modules/cjs/loader:1311:19) {
[21:59:53.819] code: ‘MODULE_NOT_FOUND’,
[21:59:53.819] requireStack: [
[21:59:53.819] ‘/vercel/path0/node_modules/webpack/lib/javascript/JavascriptModulesPlugin.js’,
[21:59:53.819] ‘/vercel/path0/node_modules/webpack/lib/WebpackOptionsApply.js’,
[21:59:53.819] ‘/vercel/path0/node_modules/webpack/lib/webpack.js’,
[21:59:53.819] ‘/vercel/path0/node_modules/webpack/lib/index.js’,
[21:59:53.820] ‘/vercel/path0/node_modules/webpack-cli/lib/webpack-cli.js’,
[21:59:53.820] ‘/vercel/path0/node_modules/webpack-cli/lib/bootstrap.js’,
[21:59:53.820] ‘/vercel/path0/node_modules/webpack-cli/bin/cli.js’,
[21:59:53.820] ‘/vercel/path0/node_modules/webpack/bin/webpack.js’
[21:59:53.820] ]
[21:59:53.820] }
[21:59:53.839] Error: Command “npm run build” exited with 2
[21:59:54.284]

Project Framework: React JS
Package Manager: webpack

Hey there,

Vercel Filesystem are case sensitive. Can you make sure the file name is indeed mergeScope not mergescope or MergeScope etc? Could you share a minimal reproducible repository that can be shared publicly as a git repository so that we can take a look?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.