Skip to content

TypeError: Cannot read properties of undefined (reading 'location') #25093

Answered by kylegach
kasir-barati asked this question in Help
Discussion options

You must be logged in to vote

I cloned and repo and ran it locally. Given your error, I had assumed the error was in the browser, so I was surprised to see that it was actually in the console.

The first few lines are:

TypeError: Cannot read properties of undefined (reading 'location')
    at instrument (/Users/kylegach/projects/my-nextjs-journey/node_modules/.pnpm/@[email protected]([email protected])/node_modules/@storybook/jest/dist/index.js:385:38)
    at Object.<anonymous> (/Users/kylegach/projects/my-nextjs-journey/node_modules/.pnpm/@[email protected]([email protected])/node_modules/@storybook/jest/dist/index.js:392:121)

Which makes me think that the issue is actually in @storybook/jest. The good news is, that package…

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@kasir-barati
Comment options

@kylegach
Comment options

Answer selected by kasir-barati
@kasir-barati
Comment options

@adnan-sheikh
Comment options

@valentinpalkovic
Comment options

@kasperpeulen
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
5 participants