astoilkov / use-local-storage-state

React hook that persists data in localStorage
MIT License
1.09k stars 39 forks source link

ESM "type": "module" throwing ERR_REQUIRE_ESM #20

Closed astoilkov closed 3 years ago

astoilkov commented 3 years ago

Related comments:

astoilkov commented 3 years ago

Next.js seems to currently not support ESM modules. This is why I reverted the "type": "module" with this commit.

Luccasoli commented 3 years ago

@astoilkov now another problem has arisen :(, an image of the new error follows:

any of the dependencies / devDependencies I'm using: "typescript": "^4.1.3" "use-local-storage-state": "^8.0.0", "next": "10.0.6", "react": "17.0.1",

image

astoilkov commented 3 years ago

@Luccasoli Fixed. Sorry for the inconvenience. You can update. The new version is 8.0.1.

Luccasoli commented 3 years ago

It worked, it was worth the support and congratulations for the library! :smile:

astoilkov commented 3 years ago

@Luccasoli Thanks!