Environment variable insertion for nextjs apps fails when config file is .mjs #881

Open
opened 2024-07-22 04:28:26 +00:00 by dboreham · 1 comment
Owner

This app's config file isn't detected. Most likely because it has a .mjs extension not .js? The test app uses .js.

Failure looks like this:

WARNING: Cannot find location to insert environment variable map in next.config.js

/usr/local/share/npm-global/lib/node_modules/js-beautify/js/lib/cli.js:478
                throw 'Must pipe input or define at least one file.';
                ^
Must pipe input or define at least one file.
(Use `node --trace-uncaught ...` to show where the exception was thrown)

This app's [config file](https://github.com/snowball-tools/pwa-nextjs-app-router/blob/main/postcss.config.mjs) isn't detected. Most likely because it has a `.mjs` extension not `.js`? The test app [uses ](https://git.vdb.to/cerc-io/test-progressive-web-app/src/branch/main/next.config.js)`.js`. Failure looks like this: ``` WARNING: Cannot find location to insert environment variable map in next.config.js /usr/local/share/npm-global/lib/node_modules/js-beautify/js/lib/cli.js:478 throw 'Must pipe input or define at least one file.'; ^ Must pipe input or define at least one file. (Use `node --trace-uncaught ...` to show where the exception was thrown) ```
telackey was assigned by dboreham 2024-07-22 04:28:35 +00:00
Author
Owner

See: #879

See: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/879
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/stack-orchestrator#881
No description provided.