sanity icon indicating copy to clipboard operation
sanity copied to clipboard

sanity 3 issue with yarn 3

Open ottob opened this issue 1 year ago • 3 comments

Hello, I tested [email protected] on macOS using yarn 3.2.1

$ sanity init --project MYID --dataset production --provider google

resulted in the following error:

? Do you want to use TypeScript? Yes ✔ Bootstrapping files from template ✔ Resolving latest module versions ✔ Creating default project files Running 'yarn install --check-files' Unknown Syntax Error: Unsupported option name ("--check-files").

$ yarn install [--json] [--immutable] [--immutable-cache] [--check-cache] [--inline-builds] [--mode #0]

Error: Command failed with exit code 1 (EPERM): yarn install --check-files at makeError (~/.config/yarn/global/node_modules/@sanity/cli/bin/sanity-cli.js:20846:17) at handlePromise (~/.config/yarn/global/node_modules/@sanity/cli/bin/sanity-cli.js:21847:33) at async installDeclaredPackages (~/.config/yarn/global/node_modules/@sanity/cli/bin/sanity-cli.js:22048:18) at async initSanity (~/.config/yarn/global/node_modules/@sanity/cli/bin/sanity-cli.js:139939:7)

If I then ran yarn install manually, I could continue as expected.

ottob avatar Jul 21 '22 18:07 ottob

Thanks for reporting! This is helpful - will see if we can release a fix for this in the next release

rexxars avatar Aug 04 '22 00:08 rexxars

Hello, I tested [email protected] on macOS using yarn 3.2.1

$ sanity init --project MYID --dataset production --provider google

resulted in the following error:

? Do you want to use TypeScript? Yes ✔ Bootstrapping files from template ✔ Resolving latest module versions ✔ Creating default project files Running 'yarn install --check-files' Unknown Syntax Error: Unsupported option name ("--check-files").

$ yarn install [--json] [--immutable] [--immutable-cache] [--check-cache] [--inline-builds] [--mode #0]

Error: Command failed with exit code 1 (EPERM): yarn install --check-files at makeError (~/.config/yarn/global/node_modules/@sanity/cli/bin/sanity-cli.js:20846:17) at handlePromise (~/.config/yarn/global/node_modules/@sanity/cli/bin/sanity-cli.js:21847:33) at async installDeclaredPackages (~/.config/yarn/global/node_modules/@sanity/cli/bin/sanity-cli.js:22048:18) at async initSanity (~/.config/yarn/global/node_modules/@sanity/cli/bin/sanity-cli.js:139939:7)

If I then ran yarn install manually, I could continue as expected.

im currently facing same issue on NPM npm v: 8.5.0 node: 16.14.2

bloom-ng avatar Aug 04 '22 00:08 bloom-ng

You can work around this for now by selecting npm instead of yarn when installing dependencies - but we will address this in the next dev-preview release

rexxars avatar Aug 08 '22 22:08 rexxars

A new dev preview release is now out which should fix this issue: https://github.com/sanity-io/sanity/releases/tag/v3.0.0-dev-preview.13

Thanks for reporting!

rexxars avatar Aug 15 '22 20:08 rexxars