Closed GitQuist closed 2 years ago
A workaround that seemed to work for us was to follow this comment
and add next-transpile-modules
to the config file
// next.config.js
const withTM = require('next-transpile-modules')(['@vercel/analytics'])
modules.exports = withTM(config)
I can confirm the exact same problem. I'm using:
"@vercel/analytics": "0.1.1",
"next": "12.3.1",
"react": "17.0.2",
And Node v16.17.1
We just published 0.1.2
that resolves this issue
I'm getting the following build error. Using React: 17. Implemented according to guide.
Any idea on how to solve it?
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/usr/folder/project/node_modules/react/jsx-runtime' imported from /Users/usr/folder/project/node_modules/@vercel/analytics/dist/react/index.js Did you mean to import react/jsx-runtime.js?