514 questions
-4
votes
1
answer
50
views
npm install react-scripts --save results in empty react-scripts folder [closed]
After cloning my React project from git, I ran npm install in my project directory, but the react-scripts/ directory remains empty.
I've deleted the node_modules/ directory and package-lock.json file ...
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
1
answer
72
views
Reactjs Chrome extension: how to open react component in new tab, react scripts
I'm trying to create a simple Chrome extension: when it's clicked, a small popup is opened that has an Expand button (Popup.js). When an Expand button is clicked, a new tab is opened (Window.js).
...
0
votes
1
answer
224
views
Getting react build failed to compile
I am getting following error while react-scripts build:
> react-scripts build
Creating an optimized production build...
Failed to compile.
Attempted import error: '...
2
votes
0
answers
62
views
Module parse failed: Unexpected token in react-idle-timer with React Scripts
I’m encountering an error when trying to compile my React project that uses the react-idle-timer package. The error points to an unexpected token in index.esm.js of react-idle-timer, specifically on ...
1
vote
0
answers
126
views
How to Configure CSP in Next.js to Allow Only Specific Scripts and Block All Others?
I am working on a Next.js (Pages Router) application and need to configure Content Security Policy (CSP) to allow only specific scripts and blocking all others. The challenge is that my application ...
1
vote
0
answers
79
views
npm audit show me report "postcss and nth-check will be update to ver 8.4.31 or latest (postcss) and to ver 2.0.1 or latest(nth-check)"
npm audit show me report "postcss and nth-check will be update to ver 8.4.31 or latest (postcss) and to ver 2.0.1 or latest(nth-check)"
latest versions on 4/18/2024: "8.4.38" and &...
1
vote
1
answer
174
views
is it secure to use SKIP_FLIGHT_CHECK=true and openssl-legacy-provider in react script npm start?
I am working on a react app which has old versions of most of the libraries being used in package.json file.
for e.g
"react": "^16.3.1",
"react-scripts": "^3.0.1&...
0
votes
0
answers
35
views
react-scripts don't work after src/ directory renamed
I renamed src/ to frontend/ and after this I have it searching in old folder src/:
$ npm run build
> [email protected] build
> react-scripts build
Could not find a required file.
...
0
votes
0
answers
87
views
How to resolve missing 'fs', 'path', 'os' with react-script (no WebPack)?
In a frontend project:
Module not found: Error: Can't resolve 'fs' in '/home/porton/Projects/passport_client_dfinity/node_modules/dotenv/lib'
...
Module not found: Error: Can't resolve 'path' in '/...
0
votes
0
answers
119
views
how to resolve npm start error in react app
After i ran
npx create-react-app ./
using my vscode integrated terminal all dependencies and node_modules are installed but when i ran
npm start
it doesn't work instead i get this error
> ...
1
vote
0
answers
415
views
Cannot find module '/React/node_modules/react-refresh/runtime.js'
I got the below error when deploying the code in cloud in local (windows) its working normally. When deploying in cloud I am getting following error:
** Uncaught Error: Cannot find module '/React/...
2
votes
1
answer
2k
views
react-scripts Vulnerabilities [closed]
It could be pretty basic but I was not able to find any convenient answer. I am developing a react js app. I am checking vulnerability and security problems in that point. One of the library I used is ...
0
votes
0
answers
162
views
React-script and Webpack version 5 migration error: "You may need an appropriate loader to handle this file type"
I am upgrading react-script from v4 to v5. By doing this internally it upgrades webpack from v4 to v5 after this I am getting below error by this command "node --trace-deprecation node_modules/...
0
votes
1
answer
54
views
Pass an argument in some react-scripts scenario
I have a standard react app with the canonical package.json entry
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build"...
0
votes
0
answers
2k
views
TypeScript error in /node_modules/@types/babel__traverse/index.d.ts
I get this error web I run react server.I have tried clear cache,downgrading both the react-scripts and typescript.I am new to react and I don't know how to handle this.
312 | // too complex ...
0
votes
1
answer
509
views
react-scripts build crashes with no other message than the memory ran out. react-scripts start runs just fine
I'm currently building an app with create-react-app. I was able build my app with no issues before this happened and I have not made any npm or node version updates since my last successful build.
...
-2
votes
1
answer
3k
views
React scripts build javascript heap out of memory
Working on a react project.
when I try to run npm run build it shows java script heap out of memory error.
Error details
I tried to find memory leak but no memory leak found but it is a single page ...
1
vote
2
answers
10k
views
Fix for dependency issue with create-react-app?
I am a beginner using React, and when I try to create a project in VSCode with npx create-react-app app I get this error:
PS C:\Users\USER\Desktop\folder> npx create-react-app app
Creating a new ...
0
votes
1
answer
157
views
react-scripts 5 failing to bundle sub-depdendency correctly
I have a react component library that worked with react scripts 4. The library is dependent on @headlessui/react, so that is in my node_modules, but not required directly by the application, only by ...
0
votes
2
answers
176
views
React& Typescript: Error while starting the development server
I was trying to create a new typescript-react project by using the command
npx create-react-app todo-list --template typescript
well the installation went well, but when I run the project with
npm ...
0
votes
1
answer
79
views
Create custom script in package.json that commits and pulls before starting server NextJS
I want to create a custom script in my package.json that will perform the following actions:
git init and git add .
prompt the user for a commit message from the terminal, if the user enters an input,...
1
vote
2
answers
188
views
Add express server to react-scripts on start
I'm using create react app and want to add a custom express server to begin when I launch my app. How can I get this working with react-scripts. At the moment this server file isn't being run.
0
votes
2
answers
2k
views
Rejected react-query mutation causing "Uncaught (in promise)" error
After upgrading react-scripts from v4 to v5, I'm facing a problem with react-query ^3.34.8.
I am rejecting a promise within useMutation which is causing the runtime error Uncaught (in promise):
// ...
1
vote
0
answers
110
views
./node_modules/force-graph/dist/force-graph.mjs Can't import the named export 'drag' from non EcmaScript module (only default export is available)
I am trying ForceGraph2D using below dependencies, but getting below error. Please help me how to fix this?
./node_modules/force-graph/dist/force-graph.mjs
Can't import the named export 'drag' from ...