in win10,I excute yarn add protobufjs, but error shows: error An unexpected error occurred: "EPERM: operation not permitted, unlink

Viewed 2967

my operating system is win10,and I excute yarn add protobufjs, it shows:

\**>yarn add protobufjs
[1/4] Resolving packages...
[2/4] Fetching packages...
error An unexpected error occurred: "EPERM: operation not permitted, unlink 

'**:\\***\\Local\\Yarn\\Cache\\v4\\npm-@babel-plugin-proposal-unicode-property-regex-7.4.4-***\\node_modules\\@babel\\plugin-proposal-unicode-property-regex\\test\\fixtures\\without-unicode-flag\\unicode-10\\input.js'".
info If you think this is a bug, please open a bug report with the information provided in "***\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

how can I solve the problem?....

2 Answers

experienced similar problem recently. The reason was that yarn was started when project was running, some files were used by the project and caused permission error. After stopping the running app the problem has gone and yarn add has completed successfully.

Check if any of your antiviruses (Windows Defender or Avast in my case) block the execution of Node.js or any of your project components

Related