1

I'm new to yarn, please excuse my ignorance.

I'm trying to run this command (on Windows Power Shell):

yarn add @solana/pay @solana/web3.js bignumber.js 

and I get this error:

yarn add v1.22.15
warning package.json: No license field
info No lockfile found.
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
warning No license field
[1/4] Resolving packages...
warning @solana/pay > @solana/web3.js > rpc-websockets > [email protected]: CircularJSON is in maintenance only, flatted is its successor.
[2/4] Fetching packages...
[3/4] Linking dependencies...
error An unexpected error occurred: "EPERM: operation not permitted, unlink 'C:\\Users\\n00b\\node_modules\\utf-8-validate\\prebuilds\\win32-ia32\\node.napi.node'".
info If you think this is a bug, please open a bug report with the information provided in "C:\\Users\\n00b\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

I've researched on Google eg

https://stackoverflow.com/questions/46020018/error-eperm-operation-not-permitted-unlink-d-sources-node-modules-fseven

(very old version not relevant)

https://github.com/phoenixframework/phoenix/issues/2464

Doesn't seem too relevant

https://www.webfoobar.com/node/39

Again didn't help

I also tried adding --no-optional to the end of the command, again same issue happened

Any idea what the problem is or how I can fix it?

Thanks a lot

2 Answers 2

2

I was using Power Shell in the Windows Terminal Preview app.

Instead I tried just using the Power Shell app directly (I think it was a later version for some reason).

it worked perfectly.

0

My solution to this one (while working with dependencies intrinsically tied to compilation/builds) was to stop the server/node instance. Usually installing dependencies does not affect this, but some dependencies (swc) are.

Not the answer you're looking for? Browse other questions tagged or ask your own question.