1
votes

F:\Web-Development>npx create-react-app portfolio-site

Creating a new React app in F:\Web-Development\portfolio-site.

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

yarn add v1.22.10 [1/4] Resolving packages... warning react-scripts > workbox-webpack-plugin > workbox-build > @hapi/[email protected]: Switch to 'npm install joi'

warning react-scripts > workbox-webpack-plugin > workbox-build > [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel.

warning react-scripts > jest > @jest/core > jest-config > jest-environment-jsdom > jsdom > [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142

warning react-scripts > jest > @jest/core > jest-config > jest-environment-jsdom > jsdom > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142

[2/4] Fetching packages...

error An unexpected error occurred: "C:\Users\Mr.Robot!\AppData\Local\Yarn\Cache\v6\npm-micromatch-3.1.10-70859bc95c9840952f359a068a3fc49f9ecfac23-integrity\node_modules\micromatch\.yarn-metadata.json: Unexpected token \u0000 in JSON at position 0".

info If you think this is a bug, please open a bug report with the information provided in "F:\Web-Development\portfolio-site\yarn-error.log". info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Aborting installation. yarnpkg add --exact react react-dom react-scripts cra-template --cwd F:\Web-Development\portfolio-site has failed.

Deleting generated file... package.json Deleting generated file... yarn.lock

My settings config. Yarn version: 1.22.10 Node version: 14.15.2 Npm version : 6.14.9 react also up to date

1
did you try yarn cache clean?Adithya
i did it works now thxShivank sagar

1 Answers

0
votes

Looks like a cache issue it might be corrupt, can you try the following command it will fix that :

yarn cache clean