You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to include Plop in one of my projects without much luck in the past few days. Today I realised that downgrading Plop to the major version 2 seems to handle this case correctly but upgrading it to version 3 breaks it again. I'm not aware of this being deprecated (please feel free to close this if it was) so I thought opening a ticket could be helpful.
The error I'm getting while running plop with a plopfile.ts:
$ npm run plop
> [email protected] plop
> plop
[PLOP] Something went wrong with reading your plop file TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts"
at new NodeError (node:internal/errors:371:5)
at Object.file: (node:internal/modules/esm/get_format:72:15)
at defaultGetFormat (node:internal/modules/esm/get_format:85:38)
at defaultLoad (node:internal/modules/esm/load:13:42)
at ESMLoader.load (node:internal/modules/esm/loader:303:26)
at ESMLoader.moduleProvider (node:internal/modules/esm/loader:230:58)
at new ModuleJob (node:internal/modules/esm/module_job:63:26)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:244:11)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Promise.all (index 0) {
code: 'ERR_UNKNOWN_FILE_EXTENSION'
}
I've been trying to include Plop in one of my projects without much luck in the past few days. Today I realised that downgrading Plop to the major version 2 seems to handle this case correctly but upgrading it to version 3 breaks it again. I'm not aware of this being deprecated (please feel free to close this if it was) so I thought opening a ticket could be helpful.
The error I'm getting while running plop with a
plopfile.ts
:A minimal repro repo created to show the issue:
https://github.com/blascsi/plop-3-typescript-error
The plop version that I found handled this case correctly:
"^2.7.6
I tried following an implementation from #290 to get this working, and found the version there.
The text was updated successfully, but these errors were encountered: