-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
valtio 1.5.0 in Next.js #410
Comments
Thanks for reporting! |
Can you try #411? |
unfortunately, another error persist whenever I tried to create a proxy state:
Another behavior I noticed is, this error only appears whenever I directly load the page that creates the proxy. If I enter the page that creates the proxy from another page (that doesn't create any proxy), it works fine, that is until I refresh. I was able to fix this by writing |
i have the same error & also, tried setting it in
& then npm ERR! The git reference could not be found
npm ERR! command git --no-replace-objects checkout fix/build/path-for-cjs
npm ERR! error: pathspec 'fix/build/path-for-cjs' did not match any file(s) known to git never had |
Thanks, guys. That was a silly mistake. |
Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import '.../node_modules/use-sync-external-store/shim' is not supported resolving ES modules imported from /Users/sivadinesh/Documents/products/2022/greenpot/node_modules/valtio/esm/index.mjs |
This works, thanks for the quick fix. |
After
yarn create next-app . && yarn add valtio
,when valtio is imported to ~/pages/index.js with
import { proxy, useSnapshot } from 'valtio'
,there is an error:
error - Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import '~/node_modules/use-sync-external-store/shim' is not supported resolving ES modules imported from ~/node_modules/valtio/esm/index.mjs Did you mean to import ~/node_modules/use-sync-external-store/shim/index.js?
Any idea how to fix it?
The text was updated successfully, but these errors were encountered: