Closed yagiz-noonlight closed 1 year ago
I understand that you installed rome
with pnpm
. Is this correct?
If so, can you try running rome with pnpm exec rome
I am also seeing this issue. pnpm exec rome
spits out the same error as above.
I haven't used pnpm workspaces myself. Does either of you have a project that I could use (or PR in that project) to reproduce the issue?
Unfortunately not. These are steps:
packages: \n - 'packages/*'
pnpm add -D rome -w
in root directoryrome format .
to any scripts.format
in package.jsonpnpm run format
Since the spawnSync
function fails with the code EACCES
is suspect this is caused by incorrect permissions being set on the rome
prebuilt binary. The rome
package makes use of a postinstall script (here: https://github.com/rome/tools/blob/1c08b8f6f31b803111752fa8169c740ae82daeab/npm/rome/scripts/postinstall.js) to ensure the permissions are set correctly on the binary file, maybe the script isn't being run correctly ?
Unfortunately not. These are steps:
1. mkdir test-folder && cd test-folder 2. npm init -y 3. touch pnpm-workspace.yml && nano pnpm-workspace.yml 4. Add `packages: \n - 'packages/*'` 5. run `pnpm add -D rome -w` in root directory 6. add `rome format .` to any `scripts.format` in package.json 7. run `pnpm run format`
I followed your instruction and added a format
command to one of the packages and to the workspace root and both run successfully. Does the setup look correct? I haven't yet tested it on MacOs
Do you see the message that the post install scripts were running successfully when running pnpm i
?
Packages are copied from the content-addressable store to the virtual store.
Content-addressable store is at: /Users/micha/Library/pnpm/store/v3
Virtual store is at: node_modules/.pnpm
node_modules/.pnpm/rome@10.0.0/node_modules/rome: Running postinstall script, done in 181ms <---- THIS
Progress: resolved 2, reused 2, downloaded 0, added 2, done
I think this isn't specially tied to pnpm workspace, but only with pnpm. Rome failed to run with pnpm (edited: macOS).
Reproduction:
pnpm create vite test-vite
pnpm i
, pnpm add rome -D
pnpm exec rome format --write .
Workaround:
Run node node_modules/.pnpm/rome@10.0.0/node_modules/rome/scripts/postinstall.js
and pnpm exec rome format
works. Looks like postinstall
script doesn't run.
Thanks for the vite example. It allows me to reproduce the issue on macos (linux is fine)
mark
Thanks for the vite example. It allows me to reproduce the issue on macos (linux is fine)
I can't replicate the issue on macOS using the instructions provided. The posinstall script works:
Packages are copied from the content-addressable store to the virtual store.
Content-addressable store is at: /Users/*/Library/pnpm/store/v3
Virtual store is at: node_modules/.pnpm
node_modules/.pnpm/esbuild@0.15.13/node_modules/esbuild: Running postinstall script, done in 423ms
Progress: resolved 43, reused 11, downloaded 6, added 17, done
node_modules/.pnpm/rome@10.0.1/node_modules/rome: Running postinstall script, done in 160ms
Thanks for the vite example. It allows me to reproduce the issue on macos (linux is fine)
I can't replicate the issue on macOS using the instructions provided. The posinstall script works:
Packages are copied from the content-addressable store to the virtual store. Content-addressable store is at: /Users/*/Library/pnpm/store/v3 Virtual store is at: node_modules/.pnpm node_modules/.pnpm/esbuild@0.15.13/node_modules/esbuild: Running postinstall script, done in 423ms Progress: resolved 43, reused 11, downloaded 6, added 17, done node_modules/.pnpm/rome@10.0.1/node_modules/rome: Running postinstall script, done in 160ms
You can use this template, you can reproduce the problem.
Great, I can re create the issue here. For some unknown reason the postinstall
script is not run in this using this template.
Great, I can re create the issue here. For some unknown reason the
postinstall
script is not run in this using this template.
Yes, thank you very much for coming to see the reason for this issue.π₯³
This question is related to pnpm. https://github.com/pnpm/pnpm/issues/4649
Create a .npmrc file in the current project:
side-effects-cache = false
remove node_modules and reinstall.
This question is related to pnpm. pnpm/pnpm#4649
Create a .npmrc file in the current project:
side-effects-cache = false
remove node_modules and reinstall.
same problem, this worked
We changed the way we set the executable bits. Can you try out the latest nightly release and test if the problem remains?
pnpm add rome@nightly
We changed the way we set the executable bits. Can you try out the latest nightly release and test if the problem remains?
pnpm add rome@nightly
it's work.
Environment information