Please provide the environment you discovered this bug in.
Node 18.19.0
Which area/package is the issue in?
create-analog
Description
Give error if try runnpm run dev for first time, after created new app with comand npm init analog (tested with angular17 or blog options) with Tailwind enabled and after install packages
Please provide the exception or error you saw
node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^
[Failed to load PostCSS config: Failed to load PostCSS config (searchPath: /Users/myUser/Code/example-blog): [ReferenceError] module is not defined in ES module scope
This file is being treated as an ES module because it has a '.js' file extension and '/Users/myUser/Code/example-blog/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
ReferenceError: module is not defined in ES module scope
This file is being treated as an ES module because it has a '.js' file extension and '/Users/myUser/Code/example-blog/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
at file:///Users/myUser/Code/example-blog/postcss.config.js:2:1
at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:336:24)
at async importDefault (file:///Users/myUser/Code/example-blog/node_modules/vite/dist/node/chunks/dep-jvB8WLp9.js:29095:18)
at async Object.search (file:///Users/myUser/Code/example-blog/node_modules/vite/dist/node/chunks/dep-jvB8WLp9.js:21351:42)]
Node.js v18.19.0
Other information
For correctly run, i need change the extensions files postcss.config.js and tailwind.config.js to .cjs
I would be willing to submit a PR to fix this issue
Please provide the environment you discovered this bug in.
Node 18.19.0
Which area/package is the issue in?
create-analog
Description
Give error if try run
npm run dev
for first time, after created new app with comandnpm init analog
(tested withangular17
orblog
options) with Tailwind enabled and after install packagesPlease provide the exception or error you saw
Other information
For correctly run, i need change the extensions files
postcss.config.js
andtailwind.config.js
to.cjs
I would be willing to submit a PR to fix this issue