Skip to content

Unable to run prettier 3.0.0 with error node_modules/.bin/prettier: Permission denied #15164

@dylanhillier

Description

@dylanhillier

Environments:

  • Prettier Version: 3.0.0
  • Running Prettier via: pnpm, npx, etc.. doesn't appear to matter.
  • Runtime: pnpm 7.14.1, node 16.16.0
  • Operating System: macOS
  • Prettier plugins (if any):

Steps to reproduce:

Install prettier as per the docs (in my case pnpm)):
https://prettier.io/docs/en/install.html

Expected behavior:

npx prettier should run.

Actual behavior:

Executing:
npx prettier

Yields:
sh: /Users/mrmagoo/Development/mobile/react-native-app/node_modules/.bin/prettier: Permission denied

Looking at the premissions of ./bin.prettier:

lrwxr-xr-x  1 mrmagoo  staff  28 Jul 27 18:12 node_modules/.bin/prettier -> ../prettier/bin/prettier.cjs
...
-rw-r--r--  2 mrmagoo  staff   2.1K Jul 25 12:55 node_modules/prettier/bin/prettier.cjs

If i grant execute permissions to node_modules/prettier/bin/prettier.cjs it all works as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:needs investigationIssues that need additional investigation, e.g. to understand whether the reported behavior is a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy