Upgrading Dynamic SDK to >=0.14.0
If you are still running NextJS with React <=17, installing our latest SDK will fail to load the ESM module. This is because from 0.14.0+ we are now bundling a fully compliant hybrid ESM and CJS packages. After installing Dynamic’s package, you might see this error:exports
field to their package.json to handle mapping react/jsx-runtime
to react/jsx-runtime.js
NextJS >=13.1 Solution
NextJS introduced a configuration option to automatically transpile ESM packages.NextJS <13.1
Before 13.1, you need tonpm i next-transpile-modules
and update your next.config.js: