Getting `Cannot read property 'prettier' of undefined` message

See original GitHub issue

Hi, Everything was working fine but then suddenly I began to receive the error message Cannot read property 'prettier' of undefined when trying to format the code. The only difference I remember is that I updated my VSCode extensions. I uninstalled the extension, reload and the reinstalled again the extension but he problem remains.

I have VSCode 1.11.1 installed on Mac OSX 10.11.6 (El Capitan).

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:7
  • Comments:23 (12 by maintainers)

github_iconTop GitHub Comments

3reactions
CiGitcommented, Apr 13, 2017

I’ve seen it, the fix is here #74 As a current workaround, be sure your package.json contains dependencies and devDependencies. They may be empty {}

2reactions
JesusIslamcommented, Apr 14, 2017

I got this exact same problem after updating.

EDIT:

I got it to work by adding "prettier": "^1.1.10" to devDependencies and do npm install

Read more comments on GitHub >

github_iconTop Results From Across the Web

Husky & Prettier [error] Cannot read property '' of null
I have checked the entire app for this '' null condition though have found nothing. .prettierrc { "arrowParens": "always", "bracketSpacing": ...
Read more >
cannot read properties of undefined (reading 'auth')
1. Add undefined check on variable. To fix the “cannot read property of undefined” error, check that the value is not undefined before...
Read more >
Cannot read properties of undefined (reading 'NormalModule ...
Hello, I'm a Vue beginner following a tutorial. When I try to run “npm run serve” in my project, I get a Starting...
Read more >
Yarn dev - TypeError: Cannot read properties of undefined ...
Yarn dev - TypeError: Cannot read properties of undefined (reading 'startsWith') ... [kobol] [extensions] › ❯ importing @roots/bud-prettier
Read more >
Uncaught TypeError: Cannot read property 'message' of ...
Uncaught TypeError : Cannot read property 'message' of undefined ... Already disabled all Plugins and switched to another theme. ... Hello @ psychosis51!...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found