Skip to content
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

Update next/navigation import & update license to use apache 2.0 #23

Conversation

tobiaslins
Copy link
Collaborator

📓 What's in there?

  • Use apache 2.0 license as written in the thread
  • Fix imports for ESM

@tobiaslins tobiaslins requested a review from a team December 6, 2023 08:34
Copy link

linear bot commented Dec 6, 2023

ALY-1099 Incorrect next/navigation import in @vercel/speed-insights

Salesforce case: https://admin.vercel.com/cases/00175878

We tried upgrading to the Speed Insights V2 product, currently in version 0.0.6.

And we can't integrate it with our current ecosystem at least directly, when building (vercel build), this error comes up consistently:

- info Collecting page data ..Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/lautaro.urtiaga/Documents/dialpad/marketing-v2/node_modules/next/navigation' imported from /Users/lautaro.urtiaga/Documents/dialpad/marketing-v2/node_modules/vercel/speed-insights/dist/next/index.mjs
Did you mean to import next/navigation.js?
at new NodeError (node:internal/errors:399:5)
at finalizeResolution (node:internal/modules/esm/resolve:326:11)
at moduleResolve (node:internal/modules/esm/resolve:945:10)
at defaultResolve (node:internal/modules/esm/resolve:1153:11)
at nextResolve (node:internal/modules/esm/loader:163:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:838:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
at ModuleWrap. (node:internal/modules/esm/module_job:77:40)
at link (node:internal/modules/esm/module_job:76:36) {
code: 'ERR_MODULE_NOT_FOUND'
}

We were able to workaround this issue by patching directly the dependency with npm "patch package" dependency, to add the .js to the import in the end. That solved the problem.

We are reach

Copy link

vercel bot commented Dec 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
speed-insights-nextjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 6, 2023 8:41am
speed-insights-nuxt ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 6, 2023 8:41am
speed-insights-remix ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 6, 2023 8:41am
speed-insights-sveltekit ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 6, 2023 8:41am
speed-insights-vue ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 6, 2023 8:41am

Copy link
Member

@feugy feugy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:fast_parrot: Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants