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.

Error: Package subpath './shallow' is not defined by "exports"

See original GitHub issue

I get the below error on a new nextjs project. The component is a copy and paste from the example in the readme. My package.json shares the same three.js dependencies. Any ideas?

Server Error
Error: Package subpath './shallow' is not defined by "exports" in .../node_modules/zustand/package.json

This error happened while generating the page. Any console logs will be displayed in the terminal window.
Call Stack
applyExports
internal/modules/cjs/loader.js (491:9)
resolveExports
internal/modules/cjs/loader.js (507:23)
Function.Module._findPath
internal/modules/cjs/loader.js (635:31)
Function.Module._resolveFilename
internal/modules/cjs/loader.js (1007:27)
Function.mod._resolveFilename
.../node_modules/next/dist/build/webpack/require-hook.js (96:28)
Function.Module._load
internal/modules/cjs/loader.js (890:27)
Module.require
internal/modules/cjs/loader.js (1080:19)
require
internal/modules/cjs/helpers.js (72:18)
Object.<anonymous>
.../node_modules/@react-three/fiber/dist/react-three-fiber.cjs.dev.js (8:15)
Module._compile
internal/modules/cjs/loader.js (1176:30)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
barelyhumancommented, Sep 30, 2021

found it. @jedashford @superposelabs , could one of you upgrade to v14.13.0 and confirm that it works after doing that?

0reactions
jedashfordcommented, Sep 30, 2021

Upgraded to v14.18.0 and it works perfectly. I’ll try with the zustand packages later in the day. Thank you!

On Wed, Sep 29, 2021 at 11:08 PM Reaper @.***> wrote:

found it. @jedashford https://github.com/jedashford @superposelabs https://github.com/superposelabs , could one of you upgrade to v14.13.0 and confirm that it works after doing that?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pmndrs/zustand/issues/576#issuecomment-930787541, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7LVTZCB3G2SSLUWEVR56DUEPWFXANCNFSM5E7D3C5A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Package subpath is not defined by "exports" - Stack Overflow
You problem sound like a dependance problem. First, try to delete node_modules directory and issue a npm install in order to re import ......
Read more >
Issues - GitHub
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/rules/no-unused-expressions' is not defined by "exports" #15195.
Read more >
When I run yarn start , I get this error - Reddit
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports" in /root/.../package.json.
Read more >
Solving linter error- 'shallow' is not defined no-undef-Reactjs
Coding example for the question Solving linter error- 'shallow' is not defined no-undef-Reactjs.
Read more >
Full text of "Natural History" - Internet Archive
These mastodont probosci- deans, however, were not of central Asiatic origin ... ice and its x-rays we have been able to ascertain not...
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