
BackUpdate your
How To fix Yarn Error: EPERM: operation not permited
Andrei T. Ferreira2021-01-15
Requirements
- Code Editor
- Windows 10
Problem
I had this error pop to me during coding a Gatsby project, I just saved some file and realized that I needed a certain library, so then tried to install it with the usual:
yarn add some-library
and there it was, the unfortunate error:
yarn add some-library Yarn Error: EPERM: operation not permited, unlink "..."
Solution
Corrupted node_modules folder
So upon some research, I decided to delete the node_modules folder, a pretty common way to solve local errors. Go to the folder that your project is hosted, then:
rmdir /s node_modules
then install all dependencies again:
rmdir /s node_modules yarn install
Update your
version
What also might be a good idea is to update your version. Some bugs may also appear after stable versions of programs, so it is a possibility that could happen these types of bugs.
To update Yarn on Windows you can use
:
choco upgrade yarn
While is the recommended way to update
, you also can install via
like so:
npm install -g yarn
Aditional information
Related Posts
- Data fetching in React.js / Next.js2023-01-08
- The app directory in Nextjs 132023-01-07
- How to optimize a React application performance2023-01-06
- What is React's useCallback?2021-09-02
- What does the useReducer hook do2023-01-05
- How to use Debounce in Reactjs?2023-01-04
- What is React memo?2021-08-31
- What is React's useMemo2021-09-02
- What is React's Context API?2021-08-28
- React - What is Prop Drilling?2021-08-28
- React - Controlled Vs Uncontrolled2021-08-27
- What is React Hooks2021-08-25
- How to fix Deploy directory 'build' does not exist Netlify2021-01-19
- How To fix Yarn Error: EPERM: operation not permited2021-01-15
- How to make a scroll to the top button in React2021-01-16
- How to handle loading in React2021-01-17
- How to change list bullet color CSS2021-01-18
ⓒ 2025 Andrei T.F.
with Next.js