5,894 questions
1
vote
0
answers
96
views
Module federation problem, host build with Vite and remote build with CRA
How can I setup a module federation for my project, I have a React Vite app as host and CRA remote app. Do you know an easy setup, do I need to use craco in remote ?
I installed craco, and had this is ...
0
votes
1
answer
71
views
Issues on serving extra html file inside nested folder of public
I am switching my project from CRA to vite recently, and found a very strange issue.
In my old CRA project, I need to serve an index.html located under public -> ohif-viewer folder
and url is ...
0
votes
0
answers
98
views
Can't get Overmind DevTools to connect
I have Overmind installed for React with DevTools:
// package.json
{
...
"dependencies": {
...
"overmind": "^28.0.4",
"overmind-devtools": "...
2
votes
1
answer
62
views
Webpack build suddenly failing because of `react-dev-utils` [closed]
I am suddenly unable to build my Webpack frontend, I randomly began getting this error despite not making any changes to the code:
Starting the development server...
/home/username/Documents/frontend/...
0
votes
0
answers
26
views
What is the correct way to (static) deploy a React App using Tomcat 9?
I'm getting a blank page on every route in my app, not sure if it's the Router config issue or Tomcat config issue. Console does show all resources and built scripts, as well as the app title but the ...
1
vote
2
answers
293
views
Create React App (CRA): Shadcn framework looks weird
For an existing Create React App (CRA) I wanted to install the shadcn framework to use some components like the date-picker.
I installed shadcn manually like stated here a few times but my components ...
0
votes
0
answers
48
views
How can I connect my MongoDB database to my ReactApp?
I wrote a basic program to connect my MongoDB database to my React App:
import { MongoClient } from 'mongodb';
import * as dotenv from 'dotenv';
dotenv.config({ path: "./config.env" });
...
0
votes
1
answer
145
views
Why eas build grabs everything from project's parent directory?
A very weird issue which started happening recently.
After
I create a new expo project with npx create-expo-app@latest <new_proj>,
add a eas.json inside of it,
and run
eas build:inspect --...
0
votes
0
answers
158
views
Migrated from CRA to Vite, Tailwind CSS error: "Cannot apply unknown utility class: sm:text-lg"
I recently migrated my project from Create React App (CRA) to Vite, and I’m running into an issue with Tailwind CSS. After making all the changes for the migration, I’m getting the following error:
...
0
votes
1
answer
112
views
How to disable no-unused-vars errors when building from create-react-app?
I'm trying to run npm build but I get "no-unused-vars" errors. I'd like to disable these.
My project is build with create-react-app (https://github.com/facebook/create-react-app), React + ...
0
votes
0
answers
147
views
React Hooks (useState, useContext) not working when importing Vite-built redesign modules into CRA project
I'm working on updating a large React application ("webapp-front-end") by creating a new module-based redesign. The idea is to gradually migrate and refactor the UI using TypeScript. The new ...
0
votes
1
answer
23
views
React-App-Rewired (compiling) "Icons" is not defined (cache issue)
I've compiled versions of this code many times over the past few years.
It also runs fine in development mode, it just won't compile to staging (or production).
VS Code isn't reporting any errors or ...
0
votes
1
answer
50
views
React Module Not Found: Unable to Resolve 'App'
As a newcomer to the industry, I just want to share my experience today. I encountered a compilation issue when I create a new react app (react 18). During the build process, I ran into the following ...
-1
votes
1
answer
515
views
npm ci typescript error in my create-react-app
I am trying to deploy and finish my first ever react webpage project.
My code is purely made in js, i dont think i used typesctipt
I've already created front-end using my knowledge and ChatGPT. And I ...
0
votes
0
answers
66
views
What is the right replacement for the "sheetjs-style" plugin in VITE
Uncaught ReferenceError: QUOTE is not defined
at sheetjs-style.js?v=1e400571:33200:15
at make_xlsx_lib (sheetjs-style.js?v=1e400571:33228:8)
at node_modules/sheetjs-style/xlsx.js (sheetjs-...
-1
votes
1
answer
81
views
unable to run create-react-app in vscode on my windows
Below is the message on the log file. Any help please, really discouraging.
'Log files:
C:\Users\user\AppData\Local\npm-cache_logs\2025-01-07T21_38_20_381Z-debug-0.log
npm resolution error report
...
1
vote
3
answers
3k
views
Trying to do a React tutorial and getting ERESOLVE "unable to resolve dependency tree"
I'm trying to learn React and npm. I'm starting the tutorial here: https://react.dev/learn/tutorial-tic-tac-toe . It also gives the setup to follow if setting up on your own laptop.
package.json :
{
...
0
votes
0
answers
54
views
restriction to items according to condition in dndkit
i am using dndkit in a cra project jsx
and have an arr ex.
const items = [
{ id: "1", name: "Item A", checked: true },
{ id: "2", name: "Item B", checked: ...
0
votes
0
answers
49
views
React app build not applying some CSS declarations
There is an issue with the CSS not being applied after the project is built. Locally the CSS displays correctly, using npm run start. Building and serving locally using npm run build and npm serve ...
0
votes
0
answers
25
views
Electron app with CRA failing child process creation
My project contain a Node server (child) process in Electron app for Windows, which works well in development but fails in production. The project is build using electron-builder and CRA used to ...
0
votes
1
answer
996
views
React version 19 error : Hydration failed because the server rendered HTML didn't match the client
I am new to React.js and got a setup of react application through:
npx create-next-app@latest projectname
After taking some minutes, setup completed with error:
I tried to research this error but ...
1
vote
1
answer
3k
views
Create React App Error: ERESOLVE error dependency
I was creating my first React app using this command mentioned on react.dev website:
npx create-react-app my-app
and it is throwing error:
Installing template dependencies using npm...
npm error code ...
4
votes
1
answer
344
views
Unable to Integrate Micro-Frontend with VITE (Remote) and CRA (Host) - Issues with Setup
In our organization, we have successfully built and integrated multiple micro-frontends using Create React App (CRA) combined with react-app-rewired. However, we recently tried to integrate a new ...
5
votes
1
answer
3k
views
npx create-react-app Could not resolve dependency peer react@"^18.0.0" from @testing-library/[email protected]
When use npx create-react-app React app, it keeps complain "Could not resolve dependency", although npm list react shows [email protected] and npm list @testing-library/react shows @testing-...
0
votes
1
answer
217
views
Error in nodejs and npm while writing files
This error is halting my progress since last week... I've tried AI, Google search, Github, asking experienced people, nothing works.
So I'm just a starter in react and nodejs. I was following Dr. ...
0
votes
0
answers
43
views
Why my env variables are not availble when I try to use like process.env.varname
Below is my job setup I want all these to be available in website to connect to firebase. But when I try to use variables with process.env.REACT_APP_FIREBASE_API_KEY_DEV it's always empty string
jobs:
...
0
votes
0
answers
28
views
I'm doing mono repo setup for my existing react apps using yarn workspaces and CRA, but build code not converted to ES5 to support chrome 38
It seems after build my react app works well in chrome 38 version. But, after moving to mono repo structure, same code not working in chrome 38 after build and looks like some part for code I see not ...
-3
votes
1
answer
200
views
How may I solve this?
darksoul@Ronits-MacBook-Air ~ % create-react-app --version
5.0.1
darksoul@Ronits-MacBook-Air ~ % react --version
zsh: command not found: react
darksoul@Ronits-MacBook-Air ~ % node --v
node: bad option:...
9
votes
6
answers
7k
views
Error in creating new React app using create-react-app appname
Installing template dependencies using npm:
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [email protected]
npm error Found: react@19....
0
votes
2
answers
5k
views
TypeError: crypto is not a function in create-react-app hello world
I'm fairly new to react (webdev in general), and built a simple hello world using npx create-react-app.
However when running it (both with a simple npm start, or building and using serve) I'm getting ...
2
votes
1
answer
259
views
Cannot run react-scripts test with chakra
When running npm test I get the following error:
Cannot find module '@chakra-ui/utils/context' from 'node_modules/@chakra-ui/react/dist/cjs/checkbox/checkbox-context.cjs'
I created the app using ...
1
vote
1
answer
146
views
CRA/webpack production error: t[s] is not a function
I'm getting this strange error in a React CRA app in production builds only:
bootstrap:19 Uncaught TypeError: t[s] is not a function
at i (bootstrap:19:22)
at Game.ts:142:3
at index.tsx:19:...
1
vote
0
answers
62
views
Web workers in React app randomly crash with a canceled chunk.js error
setting
I have a React app (using create-react-app) that utilizes web workers for multithreading. The main worker spawns multiple child workers, up to the number of CPU cores minus one, to perform ...
0
votes
0
answers
82
views
Cloudflare not reaching EC2 with https, can access through IPv4 just fine
I have a React app using create-react-app running on an EC2 and I configured my Cloudflare domain to point to it, everything was working fine - I can access the app both through the IPv4 and through ...
0
votes
1
answer
38
views
Absolute Imports with '@' on CRA is not working
I try to migrate the app from relative imports to absolute imports. According to CRA docs I add these piece of code to my tsconfig.json file:
{
"compilerOptions": {
"baseUrl: &...
1
vote
1
answer
53
views
ComponentWillUnmount method is never called
I'm developing a simple react app with the following pages:
export default class App extends Component {
...
render() {
return (
<Router>
<Navbar... />
<...
1
vote
0
answers
1k
views
Having npm deprecated issue
npm warn deprecated [email protected]: 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, ...
95
votes
8
answers
107k
views
The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0
I was using create-react-app before and now I switched the same project to vite and everything working fine except I am getting a warning log as follows
Deprecation [legacy-js-api]: The legacy JS API ...
2
votes
2
answers
984
views
Cannot run React in docker with Yarn 4 because of missing `react-scripts` packages, but works well natively (without docker)
I create a new ReactTs project from scratch, with Yarn 4.4.1 (Just started using yarn 4).
I created the project with the Create React App Client:
# In my /frontend directory
yarn create react-app . --...
-1
votes
1
answer
69
views
How to fix the missing dependency warning when using useEffect React Hook
With React 18.3.1, I get this error when I attempt to prevent an infinite loop on a fetch request:
src\pages\ItemDetail.js
Line 16:8: React Hook useEffect has a missing dependency: 'id'.remove the ...
0
votes
1
answer
44
views
Deployment of containerized React Django app with nginx
I have an app:
client in react.
server in django.
the app is containerized:
backend-container and frontend-container as follows (docker-compose.yaml):
version: '3.8'
services:
backend:
build:
...
-1
votes
1
answer
515
views
How to solve "Cannot use import statement outside a module" when you cannot set module type in package.json? [closed]
I am working on a Create-React-App project (writing in normal JS (.jsx), not TypeScript for what it's worth).
I wanted to modify some of the build files (swap out some references to local files with ...
-2
votes
2
answers
2k
views
create react app npx create-react-app my-app it shows theses what should i do
> npx create-react-app my-app
> Need to install the following packages:
> [email protected]
> Ok to proceed? (y)
>
> npm warn deprecated [email protected]: ...
0
votes
1
answer
94
views
How to Use Preact Signals in a CRA Project
I've a Create React App project and I'm trying to use useSignal as per this docs, but the values of signals are not rendering. (Like x.value does not render).
I've run:
npm i @preact/signals-react
npm ...
0
votes
1
answer
116
views
How to make .env file work in Node.js project
I made a basic Node.js/React project, and my .env file doesn't work. My project is at https://github.com/TheGElCOgecko/weather-predictor/tree/main. The main details is that I am using dotenv-webpack, ...
-1
votes
1
answer
52
views
How to access a static JSON file from the server from a react app
I have a static JSON file in my apache server and I want my react application to access the static JSON file and show its content
The idea behind is I have a Terms and Condition page in my application ...
0
votes
1
answer
66
views
Browser router path is added api request
I have a create-react-app using react-router-dom and axios
The application contains a route
/view-details/:planId/:itemId
When application navigates to the above mentioned path, the api request is ...
1
vote
0
answers
163
views
Dynamically Import & Parse JSON Files Within a URI `File` Scheme - Serverless Environment
This problem that I'm facing is very unique to me and I hope it may not be to you. Essentially, I am working on a React project built with CRA and it won't/can't be hosted on a server. The goal of the ...
1
vote
0
answers
40
views
ReactJS Image viewable on localhost (yarn start) but can't view after build (yarn build)
I inspect the network tab and see that the image contentType being changed to text/html on build version:
build img
The local yarn start version is fine: start img
The image path is correct and the ...
0
votes
0
answers
68
views
Docker Composer change Image .env variable not working
I have ReactJs app with .env file like this:
REACT_APP_SERVER_URL="URL1"
Then I using Dockerfile to build to Image:
# Fetching the latest node image on apline linux
FROM node:22 AS builder
# ...