-
Notifications
You must be signed in to change notification settings - Fork 18
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
Unable to resolve path to module 'universal-cookie' after update to 7.2.0 #624
Comments
Hey, I faced a similar issue here when trying to compile the project with [email protected].
Upon checking the index.js file, it pointed to the error related to universal-cookie not being resolved correctly. Here’s the part of the code causing the issue:
Here's my package.json dependencies for reference:
I tried using ES module imports instead of require(), but ultimately, the issue was resolved when I downgraded to an older version of react-cookie. Specifically, I used [email protected] while keeping [email protected]. |
I suspect this issue is related to #705 |
Can you try with v7.2.2 and let me know if you have the same issue? |
@eXon v7.2.2 has resolved the issue for me. Edit: Actually, scratch that, with 7.2.2 I'm still getting issues with ESLint import/no-unresolved (https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-unresolved.md)
The file looks like: import Cookies from "universal-cookie";
export const cookies = new Cookies(); And using a relative path resolves it: import Cookies from "../../node_modules/universal-cookie";
export const cookies = new Cookies(); |
We have the same issue with v7.1.4` resolves correctly |
Our setup (base):
I have tried updating the import from
[email protected]
to[email protected]
, when runningpnpm build
, I get the following error:web:build: ./src/components/navigation/language-switcher.tsx web:build: 5:21 Error: Unable to resolve path to module 'universal-cookie'. import/no-unresolved
When I downgrade back to
[email protected]
and delete the.next
folder, the build works again. Do you maybe have an idea what needs to be done in that case? Thank you 🙏The text was updated successfully, but these errors were encountered: