-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: TypeError: Cannot read properties of undefined (reading 'startsWith') #23465
Comments
I managed to solve my problem with this same error which I posted about on Storybook Discord at: https://discord.com/channels/486522875931656193/1130448886016770098 I had Prettier version 3.0.0 in my I had other issues with prettier plugins recently and I'm informed Prettier version 3.0.0 introduces breaking changes for plugins. I was using |
Indeed, I used prettier v3.0.0 and added prettier-plugin-tailwindcss. now I removed prettier-plugin-tailwindcss and everything is back to normal, thanks! |
@Star-tears Do you still have any open questions or can we close this issue? |
I'd say so as it seems to be specifically an issue with having
|
Also having a similar error with version 3.0.0 when I run prettier using its cli |
version 2.8.8 works fine |
Same issue for me. As per @Seefer it was due to |
What package manager do you use? I'm seeing this running Pnpm and wondering if package manager behavior complications could be a contributing factor. I'm somewhat of a web dev noob so this is me spitballing. |
I am using NPM so the issue is not specific to pnpm. While I can't comment on yarn, it seems to me like the tailwind package just needs an update. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Describe the bug
nextjs+eslint+prettier:
npx storybook@latest init
error when I use a customprettier
.The following error is reported:
TypeError: Cannot read properties of undefined (reading 'startsWith') at printAngular (C:\Users\13704\AppData\Local\npm-cache\_npx\bc7e1e37fcb46ffc\node_modules\prettier\index.js:24775:22) at printPathNoParens (C:\Users\13704\AppData\Local\npm-cache\_npx\bc7e1e37fcb46ffc\node_modules\prettier\index.js:29687:25) at Object.genericPrint [as print] (C:\Users\13704\AppData\Local\npm-cache\_npx\bc7e1e37fcb46ffc\node_modules\prettier\index.js:29629:23) at callPluginPrintFunction (C:\Users\13704\AppData\Local\npm-cache\_npx\bc7e1e37fcb46ffc\node_modules\prettier\index.js:8601:26) at mainPrintInternal (C:\Users\13704\AppData\Local\npm-cache\_npx\bc7e1e37fcb46ffc\node_modules\prettier\index.js:8550:22) at mainPrint (C:\Users\13704\AppData\Local\npm-cache\_npx\bc7e1e37fcb46ffc\node_modules\prettier\index.js:8537:18) at printAstToDoc (C:\Users\13704\AppData\Local\npm-cache\_npx\bc7e1e37fcb46ffc\node_modules\prettier\index.js:8529:18) at coreFormat (C:\Users\13704\AppData\Local\npm-cache\_npx\bc7e1e37fcb46ffc\node_modules\prettier\index.js:8837:20) at formatWithCursor2 (C:\Users\13704\AppData\Local\npm-cache\_npx\bc7e1e37fcb46ffc\node_modules\prettier\index.js:9021:18) at C:\Users\13704\AppData\Local\npm-cache\_npx\bc7e1e37fcb46ffc\node_modules\prettier\index.js:38183:12
To Reproduce
No response
System
Additional context
No response
The text was updated successfully, but these errors were encountered: