✨Discover storytelling in the AI age with Pixar's Matthew Luhn at Sanity Connect, May 8th—register now

Error encountered while testing sanity, resolved by deleting node_modules folder.

3 replies
Last updated: Jul 27, 2023
Hey Everyone I run into this error while trying to test sanity
@omar ➜ sanity-test npm create sanity@latest

Need to install the following packages:

create-sanity@3.14.3

Ok to proceed? (y) y

npm WARN cleanup Failed to remove some directories [

npm WARN cleanup   [

npm WARN cleanup     'C:\\Users\\omar\\AppData\\Local\\npm-cache\\_npx\\67a0730928194b24\\node_modules\\@sanity\\cli',

npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\Users\omar\AppData\Local\npm-cache\_npx\67a0730928194b24\node_modules\@sanity\cli\src\actions\init-project\templates\nextjs'] {

npm WARN cleanup       errno: -4048,

npm WARN cleanup       code: 'EPERM',

npm WARN cleanup       syscall: 'rmdir',

npm WARN cleanup       path: 'C:\\Users\\omar\\AppData\\Local\\npm-cache\\_npx\\67a0730928194b24\\node_modules\\@sanity\\cli\\src\\actions\\init-project\\templates\\nextjs'

npm WARN cleanup     }

npm WARN cleanup   ]

npm WARN cleanup ]

npm ERR! code 1

npm ERR! path C:\Users\omar\AppData\Local\npm-cache\_npx\67a0730928194b24\node_modules\esbuild

npm ERR! command failed

npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node install.js

npm ERR! node:internal/errors:865

npm ERR!   const err = new Error(message);

npm ERR! Error: Command failed: C:\Program Files\nodejs\node.exe C:\Users\omar\AppData\Local\npm-cache\_npx\67a0730928194b24\node_modules\esbuild\bin\esbuild --version

npm ERR! Node.js v18.17.0
Jul 22, 2023, 6:57 PM
This is an issue with settings on your machine. Try looking up the error code for a resolution.
Jul 24, 2023, 4:33 PM
Thanks I'll Look it up!
Jul 25, 2023, 8:14 PM
So I fixed it by deleting the node_modules folder that exists in the error message.Works Just fine right now
Jul 27, 2023, 11:33 AM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?