-
-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
help wantedExtra attention is neededExtra attention is needed
Description
Hello
I recently updated a project of mine to Next 12 and then also updated the converkit-react library to 1.5.5.
When I startup the project and load my page with the form on it I now get the following error.
error - unhandledRejection: ReferenceError: require is not defined in ES module scope, you can use import instead
This file is being treated as an ES module because it has a '.js' file extension and '/workspaces/project/node_modules/convertkit-react/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
I do not think I am going anything special. This is a vanilla next project and I import the form with the following.
import ConvertKitForm from 'convertkit-react';
I am not sure what might be going wrong here but I see in the project history there was a release specifically for Next around commonjs a few releases back.
Maybe something has changed with Next 12?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed