Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
1 answer
23 views

nextjs import multiple components from index manifest imports everything

BACKGROUND: I have a project where I have all my UI components in a /components directory. Right now I export each component in its own file as: export function Component1() { ... } and import them ...
rsilva's user avatar
  • 300
0 votes
1 answer
21 views

NextJS 14 / React 18 post upgrade error: TypeError: can't access property "useState", dispatcher is null

I'm in a NextJS app that I've recently upgraded from NextJS 12 to 14, and upgraded React from 16 to 18... plus a bunch of other libraries. It's been a trek, and all the things are upgraded. I am ...
Jeremy John's user avatar
  • 13.8k
0 votes
0 answers
15 views

How do I set up next.js to use webpack?

Ive installed my app with npx create ..., installed webpack library and created webpack.config.js, when Im running it down the app does not use a webpack for assembling.I tried to change the settings ...
crabgame's user avatar
0 votes
0 answers
10 views

Chunks with Dynamically Imported Components code Served Over HTTP Instead of HTTPS in Next.js App

We recently updated the packages in our turborepo, which includes a Node app and a Next.js app. After deploying, we noticed that some chunks are being served via HTTP instead of HTTPS, causing mixed ...
Patryk's user avatar
  • 25
0 votes
0 answers
18 views

Nextjs does not respect serverComponentsExternalPackages in production

I try to bundle react code in a nextjs api using esbuild. It works on local fine but not in production. Here is my serverComponentsExternalPackages configuration. experimental: { ...
Furkan Koseoglu's user avatar
1 vote
0 answers
80 views

Why Sentry throws "Invalid token" (http status: 401) error for a valid token?

I've got a next.js application that connected to sentry and I'm confident about the token, But when I tried to run npm run build in my app to get output I faced Invalid token (http status: 401) error. ...
amirali erfani's user avatar
3 votes
2 answers
103 views

How to use a Web Worker bundled in an NPM package in a NextJS application

Github Repo to reproduce issue: https://github.com/kyledecot/next-worker-bug I have a NextJS application and an NPM package. The NPM package is bundled using webpack/ts-loader and contains a web ...
Kyle Decot's user avatar
  • 20.7k
0 votes
1 answer
61 views

How do I trace errors in Next.js?

Error tracing is quite difficult in Next since it shows the path of the file in the build folder, how can I trace back to where the error originally occurred in my project folder structure? I have ...
OmarAbouzeid95's user avatar
-1 votes
0 answers
36 views

Next.js Build failed because of webpack errors: CssSyntaxError

I've been stuck and going all over internet trying to figure something that prevents my app to be build on Vercell (well locally as well). npm run dev - works great, no issues stylelint and eslint ...
Fallen Angel's user avatar
1 vote
0 answers
50 views

Utilize react component over URLs dyanamically

I have a React component say TEST.TSX , I have compiled the .tsx file to .js and uploaded it to GitHub, so that I can server it over JsDelivr. Can I use the CDN in another react app to utilize the ...
Pradeep Yadav's user avatar
2 votes
0 answers
97 views

Error: (0 , react__WEBPACK_IMPORTED_MODULE_0__.createContext) is not a function [closed]

I'm new to next.js and I'm facing this error from past two days but can't find any way to debug it: Error: (0 , react__WEBPACK_IMPORTED_MODULE_0__.createContext) is not a function after deep research,...
Abdul Basit's user avatar
0 votes
0 answers
96 views

Excluding dependencies from bundle (NextJS & Turbopack)

I am using package in my NextJS which includes modules for React Native that need to be excluded. As part of a migration to move to Turbopack from Webpack, I need to find a way to exclude these ...
Mark Barton's user avatar
0 votes
0 answers
40 views

Icon Component with Dynamic SVG Imports vs Bundle Size next.js - v14.2.3

I am trying to create an Icon component in a Next.js application that imports SVGs dynamically without significantly increasing the bundle size. Despite using various methods such as require.context(),...
Kiran Raj R's user avatar
0 votes
0 answers
10 views

Next 13.5.2 does not resolve ESM modules correctly in imported packages

I import package A in a Next JS application. Package A imports an icon from @mui/icons-material like this import Icon from "@mui/icons-material/Icon". This causes an error, as Icon looks ...
Łukasz Karczewski's user avatar
1 vote
1 answer
78 views

Export React as one inline HTML file

I am making one-page websites for particular service that accepts only single inline html files. I want to make these webpages as modularly as possible (to make many versions of them) and am thus ...
rass3's user avatar
  • 11

15 30 50 per page
1
2 3 4 5
59