Skip to content
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

Cannot launch nextjs test project #8

Open
tusharsnx opened this issue Jun 17, 2024 · 0 comments
Open

Cannot launch nextjs test project #8

tusharsnx opened this issue Jun 17, 2024 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@tusharsnx
Copy link
Owner

There is a bad file name issue in our nextjs test project. The project is not an ESM module, yet the nextjs config file that uses .js extension uses ESM import syntax.

Error message:

(node:159927) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
/home/tushar/projects/jsx-css-module-transforms/test-projects/nextjs/next.config.js:1
import JsxCssModuleTransforms from "jsx-css-module-transforms";
^^^^^^

SyntaxError: Cannot use import statement outside a module

A possible fix is to replace the config's extension to be .mjs and also update the export statement to follow ESM syntax

@tusharsnx tusharsnx added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Jun 17, 2024
@tusharsnx tusharsnx pinned this issue Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant