From 9b5bacfa5e3ce1a2fb2af25330ed01e64f343eae Mon Sep 17 00:00:00 2001 From: Adam Hosker Date: Wed, 10 May 2023 18:41:18 +0100 Subject: [PATCH] Rename postcss.config.js to postcss.config.cjs On Default Laravel Sail Install the original STUB causes an error this solves the issue. Renaming postcss.config.cjs to postcss.config.js as the error outlines fixes the issue. Fixes Error: ```` node:internal/process/promises:288 triggerUncaughtException(err, true /* fromPromise */); ^ [Failed to load PostCSS config: Failed to load PostCSS config (searchPath: /var/www/html): [Failed to load PostCSS config] Failed to load PostCSS config (searchPath: /var/www/html): [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 '/var/www/html/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 '/var/www/html/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension. at file:///var/www/html/postcss.config.js:1:1 at ModuleJob.run (node:internal/modules/esm/module_job:194:25) ] Node.js v18.16.0 ```` --- stubs/default/{postcss.config.js => postcss.config.cjs} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename stubs/default/{postcss.config.js => postcss.config.cjs} (100%) diff --git a/stubs/default/postcss.config.js b/stubs/default/postcss.config.cjs similarity index 100% rename from stubs/default/postcss.config.js rename to stubs/default/postcss.config.cjs