Syntax errors with NextJS
See original GitHub issueHi @tbleckert, I’m unable to get it to work with NextJS, seeing the errors below. Any thoughts on how to fix them?
SyntaxError: Unexpected token 'export'
at wrapSafe (internal/modules/cjs/loader.js:1067:16)
at Module._compile (internal/modules/cjs/loader.js:1115:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Module.require (internal/modules/cjs/loader.js:1040:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.react-select-search
/Users/anuj/Code/shuffle-web-next/node_modules/react-select-search/dist/esm/index.js:1
export { default as useSelect } from './useSelect';
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:6 (3 by maintainers)
Top Results From Across the Web
IE11 & Next.js 12 version have syntax error with rewrites in ...
What example does this report relate to? with rewrites in next.config.js What version of Next.js are you using?
Read more >next-config-error - Next.js
When attempting to load your next.config.js or next.config.mjs file, an error occurred. This could be due to a syntax error or attempting to...
Read more >NextJS 12 Runtime Crash - SyntaxError: Unexpected token
The problem seems to be running on Alpine linux as I can perform a production build locally, then run it with no issues...
Read more >Error compiling on code that didn't change : r/nextjs - Reddit
I read somewhere that Nextjs can have problems when using js babel and suggested I switch to the json format and indeed that...
Read more >Create-Next-App (Next.js) Build Failure --> Syntax Error
I keep getting the same error all the time. I uninstalled node.js on my laptop and reinstalled -v16.9 then ran “create-next-app”, then pushed ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you’re using it with SSR you need to use the commonjs build,
Let me know if that works and if you encounter any other problems, I haven’t had a chance to test to render it server side yet, but shouldn’t be any problem as I don’t use any browser API’s on first render.
Please update the read me to include something like:
If your using SSR where the CSS has to be included elsewhere you’ll need to import using:
And then pass a function as the className as described here.