-
Notifications
You must be signed in to change notification settings - Fork 31
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
import error #3
Comments
@Riley-Brown can you please check. Anything you can do to help will be greatly appreciated. |
Hi! I'm also using this in my Next.js project In my exploration looks like Next.js still have an issue for ES module vercel/next.js#9607 this is how is solve it
const withTM = require('next-transpile-modules')(['react-hook-speech-to-text'])
module.exports = withTM({
// your config, if any
}) |
will give it a try. Thanks. |
Hello did you succeed to use this package in a Next.js project ? |
I have the same issue even after doing
Any updates? |
"react-hook-speech-to-text": "^0.4.0",
I copied the sample code into my nextjs repo and tried to run it. Got the following error:
SyntaxError: Cannot use import statement outside a module
at wrapSafe (internal/modules/cjs/loader.js:1172:16)
at Module._compile (internal/modules/cjs/loader.js:1220:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1277:10)
at Module.load (internal/modules/cjs/loader.js:1105:32)
at Function.Module._load (internal/modules/cjs/loader.js:967:14)
at Module.require (internal/modules/cjs/loader.js:1145:19)
at require (internal/modules/cjs/helpers.js:75:18)
at eval (webpack-internal:///react-hook-speech-to-text:1:18)
at Object.react-hook-speech-to-text (/Users/sushilbansal/Documents/projects/kami/kami-next/.next/server/pages/join-chat.js:161:1)
at webpack_require (/Users/sushilbansal/Documents/projects/kami/kami-next/.next/server/pages/join-chat.js:23:31)
at eval (webpack-internal:///./web/modules/videoChat/Transcript.tsx:7:83)
at Module../web/modules/videoChat/Transcript.tsx (/Users/sushilbansal/Documents/projects/kami/kami-next/.next/server/pages/join-chat.js:128:1)
at webpack_require (/Users/sushilbansal/Documents/projects/kami/kami-next/.next/server/pages/join-chat.js:23:31)
at eval (webpack-internal:///./web/modules/videoChat/PeerChat.tsx:13:69)
at Module../web/modules/videoChat/PeerChat.tsx (/Users/sushilbansal/Documents/projects/kami/kami-next/.next/server/pages/join-chat.js:116:1)
at webpack_require (/Users/sushilbansal/Documents/projects/kami/kami-next/.next/server/pages/join-chat.js:23:31)
The text was updated successfully, but these errors were encountered: