Skip to content

postcss.config.js cannot be converted to TypeScript #5

@paradoxe-tech

Description

@paradoxe-tech

https://github.com/paradoxe-tech/Helios/blob/d91c62ab2cea8c452d2d1390872e9e07722a882d/client/postcss.config.js

Most probably, some postcss processors use a require() on this file ; which is defined by client/package.json as an ES Module.

[vite:css] Failed to load PostCSS config (searchPath: /home/runner/helios/client): [Error] Must use import to load ES Module: /home/runner/helios/client/postcss.config.ts
require() of ES modules is not supported.
require() of /home/runner/helios/client/postcss.config.ts from /home/runner/helios/client/node_modules/vite/dist/node/chunks/dep-3e87c7b2.js is an ES module file as it is a .ts file whose nearest parent package.json contains "type": "module" which defines all .ts files in that package scope as ES modules.
Instead change the requiring code to use import(), or remove "type": "module" from /home/runner/helios/client/package.json.

Metadata

Metadata

Assignees

Labels

ENVmeta-bugDependencies or environment bug

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions