2021-12-05

Why am getting "cannot read properties of undefined (reading 'server')" while trying to install React?

I am installing react for the first time. and I can't seem to get rid of these problem. when I run these command.

npx create-react-app employee

I first got "ENolock these command requires existing lockfile" Error then I run

npm audit fix --force

when I try to create react app now I am faced with these error as you can see on the attached image below what can I do ? p.s I have also tried npm cache clean and then trying to create the react app

C:\Full stack app\client>npm audit
npm ERR! code ENOLOCK
npm ERR! audit This command requires an existing lockfile.
npm ERR! audit Try creating one first with: npm i --package-lock-only
npm ERR! audit Original error: loadVirtual requires existing shrinkwrap file

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\SENU\AppData\Local\npm-cache\_logs\2021-12-04T15_48_12_673Z-debug.log

C:\Full stack app\client>npx create-react-app employee

Creating a new React app in C:\Full stack app\client\employee.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...

npm ERR! Cannot read properties of undefined (reading 'isServer')

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\SENU\AppData\Local\npm-cache\_logs\2021-12-04T15_50_22_255Z-debug.log

Aborting installation.
  npm install --save --save-exact --loglevel error react react-dom react-scripts cra-template has failed.

Deleting generated file... package.json
Deleting employee/ from C:\Full stack app\client
Done.

C:\Full stack app\client>


from Recent Questions - Stack Overflow https://ift.tt/3opUnhc
https://ift.tt/eA8V8J

No comments:

Post a Comment