Unable to import into nextjs
Closed this issue · 2 comments
kkothari2001 commented
This is what I'm trying to import.
And these are the errors I'm getting:
/home/kmk/sra/sra-website/node_modules/emailjs-com/es/index.js:1
import { init } from './methods/init/init';
^
SyntaxError: Unexpected token {
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at eval (webpack-internal:///emailjs-com:1:18)
at Object.emailjs-com (/home/kmk/sra/sra-website/.next/server/pages/contactus.js:138:1)
at __webpack_require__ (/home/kmk/sra/sra-website/.next/server/pages/contactus.js:23:31)
kkothari2001 commented
Solved by using next-transpile-modules
, apologies for disturbing.
ManuC84 commented
Hey! Can you help me out for a sec? Where do you exactly load the config from next-transpile-modules? Thanks in advance!