Support yarn v2
h4x3rotab opened this issue · 2 comments
h4x3rotab commented
If I follow the official yarn v2 installation guide, I will end up with the following error:
root@c095c9f88cfd:~/project# yarn devphase --help
/root/project/devphase.config.ts:3
import { ConfigOption } from 'devphase';
^^^^^^
SyntaxError: Cannot use import statement outside a module
However if I rollback to yarn v1, everything works well.
l00k commented
Are you sure it is yarn v2?
Cuz as far as I know it has some issues with typescript installation (which is obviously required)
yarnpkg/berry#2935
I have checked v3 here I can reproduce error above.
Sadly I have no idea what may be the issue - for now it has lower priority.
l00k commented
Sadly that seems really hard to fix.
Closing for now.
Notes for future try:
- branch
esm
created - after switching to
yarn@^3.4
it is required to compile asesm
and switch package type tomodule
- cuz it is impossible to loaddevphase.config.ts
outside of module (commonjs) - after mentioned changes there are issues in dependencies tree -
@phala/sdk
wrongly importsAxiosError
fromaxios
which is commonjs package