Next.js Discord

Discord Forum

deploy to vercel

Unanswered
juanppdev posted this in #help-forum
Open in Discord
How can I solve this error when deploying to vercel?

[08:32:55] Running build in Cleveland, USA (East) – cle1
[08:32:55] Cloning github.com/juanppdev/juanppdev-portfolio (Branch: main, Commit: 27ec05d)
[08:32:56] Previous build cache not available
[08:32:56] Cloning completed: 487.94ms
[08:32:56] Running "vercel build"
[08:32:56] Vercel CLI 30.2.1
[08:32:57] Installing dependencies...
[08:33:02] 
[08:33:02] added 483 packages in 5s
[08:33:02] 
[08:33:02] 185 packages are looking for funding
[08:33:02]   run `npm fund` for details
[08:33:02] Detected `package-lock.json` generated by npm 7+...
[08:33:02] Running "npm run build"
[08:33:02] 
[08:33:02] > juanppdev-portfolio@0.0.1 build
[08:33:02] > astro build
[08:33:02] 
[08:33:03] 06:33:03 AM [content] No content directory found. Skipping type generation.
[08:33:03] 06:33:03 AM [build] output target: static
[08:33:03] 06:33:03 AM [build] Collecting build info...
[08:33:03] 06:33:03 AM [build] Completed in 72ms.
[08:33:03] 06:33:03 AM [build] Building static entrypoints...
[08:33:05] 06:33:05 AM [build] Completed in 1.34s.
[08:33:05] 
[08:33:05]  building client 
[08:33:05] Completed in 669ms.
[08:33:05] 
[08:33:05] 
[08:33:05]  generating static routes 
[08:33:06]  error   Named export 'BsFillCameraFill' not found. The requested module 'react-icons/bs/index.esm.js' is a CommonJS module, which may not support all module.exports as named exports.
[08:33:06]   CommonJS modules can always be imported via the default export, for example using:
[08:33:06]   
[08:33:06]   import pkg from 'react-icons/bs/index.esm.js';
[08:33:06]   const { BsFillCameraFill } = pkg;
[08:33:06]   
[08:33:06] file:///vercel/path0/dist/chunks/pages/index.astro.47abaacd.mjs:3
[08:33:06] import { BsFillCameraFill } from 'react-icons/bs/index.esm.js';
[08:33:06]          ^^^^^^^^^^^^^^^^
[08:33:06] SyntaxError: Named export 'BsFillCameraFill' not found. The requested module 'react-icons/bs/index.esm.js' is a CommonJS module, which may not support all module.exports as named exports.
[08:33:06] CommonJS modules can always be imported via the default export, for example using:
[08:33:06] 
[08:33:06] import pkg from 'react-icons/bs/index.esm.js';
[08:33:06] const { BsFillCameraFill } = pkg;
[08:33:06] 
[08:33:06]     at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
[08:33:06]     at async ModuleJob.run (node:internal/modules/esm/module_job:190:5)
[08:33:06] Error: Command "npm run build" exited with 1
[08:33:06] BUILD_UTILS_SPAWN_1: Command "npm run build" exited with 1

0 Replies