question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] [vite] Uncaught TypeError: Cannot read properties of undefined (reading 'custom') at .yarn/cache/object-inspect-npm-1.12.2-f125a822c0-a534fc1b85.zip/node_modules/object-inspect/index.js (index.js:69:33)

See original GitHub issue

What version of vite are you using?

^2.9.9

System info and storybook versions

System: OS: Windows 10 10.0.22621 CPU: (16) x64 12th Gen Intel® Core™ i5-12600K Binaries: Node: 16.15.1 - C:\Program Files\nodejs\node.EXE Yarn: 3.2.1 - ~\AppData\Roaming\npm\yarn.CMD npm: 8.12.2 - C:\Program Files\nodejs\npm.CMD Browsers: Edge: Spartan (44.22621.160.0), Chromium (103.0.1264.37)

"@storybook/addon-actions": "^6.5.9",
"@storybook/addon-docs": "^6.5.9",
"@storybook/addon-essentials": "^6.5.9",
"@storybook/addon-interactions": "^6.5.9",
"@storybook/addon-links": "^6.5.9",
"@storybook/builder-vite": "^0.1.38",
"@storybook/core-common": "^6.5.9",
"@storybook/node-logger": "^6.5.9",
"@storybook/react": "^6.5.9",
"@storybook/testing-library": "^0.0.13",

Describe the Bug

When using Yarn PnP with Storybook in a Vite project I get this error when running yarn storybook.

Uncaught TypeError: Cannot read properties of undefined (reading 'custom') at .yarn/cache/object-inspect-npm-1.12.2-f125a822c0-a534fc1b85.zip/node_modules/object-inspect/index.js (index.js:69:33) at __require2 (chunk-CCD2FOVN.js?v=5a6567aa:18:50) at .yarn/cache/side-channel-npm-1.0.4-e1f38b9e06-351e41b947.zip/node_modules/side-channel/index.js (index.js:5:15) at __require2 (chunk-CCD2FOVN.js?v=5a6567aa:18:50) at .yarn/cache/qs-npm-6.11.0-caf1bc9dea-6e1f29dd53.zip/node_modules/qs/lib/stringify.js (stringify.js:3:22) at __require2 (chunk-CCD2FOVN.js?v=5a6567aa:18:50) at .yarn/cache/qs-npm-6.11.0-caf1bc9dea-6e1f29dd53.zip/node_modules/qs/lib/index.js (index.js:3:17) at __require2 (chunk-CCD2FOVN.js?v=5a6567aa:18:50) at UrlStore.js:30:16

In the minimal reproducible example I just did :

yarn create vite my-vue-app --template react-ts // to create a vite project with react typescript

yarn set version berry // to set yarn version to Yarn v2

then I made sure that wasn’t any nodeLinker: node-modules in my .yarnrc.yml so PnP was truly activated

npx storybook init // to install Storybook

PS: I had many errors before about undeclared peerDependencies :

but I managed to solve those problems installing them as dependencies of my project. yarn add -D @storybook/core-common @storybook/node-logger @storybook/preview-web ...

Link to Minimal Reproducible Example

https://github.com/fivaz/react-storybook-vue

Participation

  • I am willing to submit a pull request for this issue.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
JobiJobacommented, Jul 3, 2022

Personally I had to install all those one with PNPM:

 "@storybook/preview-web": "6.5.9",
    "@storybook/addon-docs": "6.5.9",
    "@storybook/client-api": "6.5.9",
    "@storybook/addon-backgrounds": "6.5.9",
    "@storybook/addon-measure": "6.5.9",
    "@storybook/addon-outline": "6.5.9",
    "@storybook/channel-postmessage": "6.5.9",
    "@storybook/channel-websocket": "6.5.9",
    "@storybook/addons": "6.5.9",
3reactions
rohanrajpalcommented, Jul 15, 2022

facing the

Personally I had to install all those one with PNPM:

 "@storybook/preview-web": "6.5.9",
    "@storybook/addon-docs": "6.5.9",
    "@storybook/client-api": "6.5.9",
    "@storybook/addon-backgrounds": "6.5.9",
    "@storybook/addon-measure": "6.5.9",
    "@storybook/addon-outline": "6.5.9",
    "@storybook/channel-postmessage": "6.5.9",
    "@storybook/channel-websocket": "6.5.9",
    "@storybook/addons": "6.5.9",

Faced the same issue with Pnpm, adding these dependencies manually helped!

Read more comments on GitHub >

github_iconTop Results From Across the Web

vite + vue TypeError: Cannot read properties of undefined ...
ur using script setup, this is undefined, just use vars <script setup> import { computed, ref, watch } from "vue"; // smth like...
Read more >
GWAS of self-reported mosquito bite size, itch intensity ... - NCBI
In this study, we conducted the first genome-wide association studies (GWAS) of self-reported mosquito bite reaction size (n = 84,724), itchiness caused by ......
Read more >
Frequently Asked Questions | La Crosse encephalitis - CDC
What is La Crosse encephalitis? La Crosse (LAC) encephalitis is a rare disease caused by the bite of a mosquito infected with LAC...
Read more >
Bed Bugs in Wisconsin - Questions and Answers, P-00489
Bed bugs (Cimex lectularis) are small, flat, wingless insects that ... The evidence you may find includes; finding bed bug bite marks on...
Read more >
Amazon.com: BUG BITE THING Suction Tool, Poison Remover
Buy BUG BITE THING Suction Tool, Poison Remover - Bug Bites and Bee/Wasp Stings, Natural Insect Bite Relief, Chemical Free - White/Single on...
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