New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
loading a directory of commands is not supported yet for ESM #315
Comments
I really want to fix this, so can you please provide more information? Which version of curlconverter are you using ( |
Closing as dupe of #249 |
did you solve the problem, I meet the same and didn't solved |
@www-j99 can you please post step-by-step instructions with code and which version of node and operating system you're using that I can follow to experience this issue? |
1、type 'npm install curlconverter --save' in the terminal of WebStorm for 'Vue2' frontend project |
Same problem encountered here. I'm trying use this lib's APIs in our vue project which running in browser. After doing some search, i tried the solution using "@open-wc/webpack-import-meta-loader" from vuejs forum. By configuring vue.config.js file with code below, I managed to avoid the "compilation failure" mentioned in this issue:
but unfortunately, another runtime error pops: esm.mjs:36:1, which leading me to the compiled code: this is as far as i get, not sure if it would help. and contextual dependency: full dependency section in package.json ( which basically follows project template, clone this template project locally and add curlconverter as its dependency may helps reproducing this problem:
|
@SoLoHiC thanks for the info. Out of curiosity, can you try |
I reproduced this with 4.4.1 on
I got this error:
curlconverter uses top level configureWebpack: {
experiments: {
topLevelAwait: true
},
}, but I tried running
|
ERROR Failed to compile with 1 error 8:36:56 PM
error in ./node_modules/@curlconverter/yargs/lib/platform-shims/esm.mjs
Module parse failed: Unexpected token (18:41)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| const REQUIRE_DIRECTORY_ERROR = 'loading a directory of commands is not supported yet for ESM'
|
node -v 14
The text was updated successfully, but these errors were encountered: