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'm trying to use this package inside oclif, but I'm hitting this error. Essentially it doesn't support loading es modules. Despite the fact that this module is TypeScript and my code is TypeScript, the modules won't play nice.
I don't fully understand the ins and outs. I guess that you're only publishing an ESM module which is the latest and greatest, and oclif is using some older module loading strategy which won't play nice.
Question, would you be open to publishing a dual build module? For inspiration, I've been able to import tsdav without issue in oclif.
The text was updated successfully, but these errors were encountered:
Its really strange, I'm not sure exactly how it works, but the error message is shown below:
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /home/travis/build/mrbrianevans/social-media-export-analyser/lib-testing/test/preProcessing/HtmlPreProcessing.spec.ts
It looks unrelated, but I've isolated it to using this module by checking out previous commits (that are known to work) and installing the module and immediately this error comes up.
I cloned your repo to see what could be done to fix this issue, and changing to CommonJS modules solves it for me.
That is changing tsconfig.json/compilerOptions/module to "CommonJS" and package.json/type to "commonjs".
I know ESmodules are the future and should be preferred, so if possible it would be great to do what @chmac suggested and publish both. I myself am not sure how exactly that would be done, but I think it would solve these errors.
I'm trying to use this package inside oclif, but I'm hitting this error. Essentially it doesn't support loading es modules. Despite the fact that this module is TypeScript and my code is TypeScript, the modules won't play nice.
I don't fully understand the ins and outs. I guess that you're only publishing an ESM module which is the latest and greatest, and oclif is using some older module loading strategy which won't play nice.
Question, would you be open to publishing a dual build module? For inspiration, I've been able to import tsdav without issue in oclif.
The text was updated successfully, but these errors were encountered: