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
ESLint: Unable to resolve path to module '@vercel/analytics/react' (import/no-unresolved) #18
Comments
Hey! |
Hey! I saw that you have installed
Else you can just install the required plugin: Let me know if it works! :) |
@tobiaslins Would this be the same process in a non-typescript project? |
@Hearmstrong It might not be required. There is a JavaScript version as well: https://www.npmjs.com/package/eslint-plugin-import Note that I haven't tested this out. |
Will close this for now. Let us know if you still have problems! |
I have the
Admittedly a lot of this config is old and haven't audited it in a while. Nor sure if there are any conflicts happening. |
Thank you so much @tobiaslins! That was exactly my problem and your solution worked. I'm surprised I managed to get this far in my app without actually using |
Uses the solution described in vercel/analytics#18 (comment) to fix eslint config, which removes the need for my eslint-ignore directive. Also fixes some minor lint issues that leaked into codebase.
Steps to reproduce:
npm install @vercel/analytics
_app.jsx
(or_app.tsx
if relevant), addimport { Analytics } from "@vercel/analytics/react";
.vercel
Expected behavior:
Actual behavior:
Workaround:
// eslint-disable-next-line import/no-unresolved
beforeimport { Analytics } from "@vercel/analytics/react";
.Version:
0.1.5
This is also as described in https://stackoverflow.com/a/74453475/2736037.
The text was updated successfully, but these errors were encountered: