Open seed-of-apricot opened 5 years ago
We are aware of this issue and working on it. We changed the underline implementation of the base typescript recently and it's still not stable enough. You can use v3.0.1 which not using the new base typescriptץ
Hi @seed-of-apricot , I published a few updates of the compiler. Can you test that and let me know if there is still an issue. Can you try 3.0.22? If the issue persist it would be helpful to provide some kind of repo which reconstructs the base issue.
Thank you for your cooperation, I'm actually traveling with limited resources until Thursday so let me see once I'm back home.
@JoshK2 @qballer Sorry for late response. I have tried 3.0.22 and 3.0.25, and in short it didn't work perfectly.
First, the build succeeded for the svg component itself.
C:\Users\[user]\src\[user]\[project]\[sub_project]>bit tag images/logo
1 component(s) tagged
(use "bit export [collection]" to push these components to a remote")
(use "bit untag" to unstage versions)
new components
(first version for components)
> images/logo@0.0.1
However, a component that depends on that svg does not pass the build.
C:\Users\[user]\src\[user]\[project]\[sub_project]>bit tag atoms/brand-logo
/ building componentsBrandLogo.tsx:3:18 - error TS2307: Cannot find module '@assets/images/logo/index.svg'.
3 import logo from '@assets/images/logo/index.svg';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Found 1 error.
error: bit failed to build atoms/brand-logo with the following exception:
Command failed with exit code 2 (Unknown system error -2): C:\Users\[user]\src\[user]\[project]\[sub_project]\.git\bit\components\compilers\react-typescript\bit.envs\3.0.22\components\.dependencies\compilers\typescript\bit.envs\3.0.28\node_modules\typescript\bin\tsc -d
Error: Command failed with exit code 2 (Unknown system error -2): C:\Users\[user]\src\[user]\[project]\[sub_project]\.git\bit\components\compilers\react-typescript\bit.envs\3.0.22\components\.dependencies\compilers\typescript\bit.envs\3.0.28\node_modules\typescript\bin\tsc -d
at makeError (C:\Users\[user]\src\[user]\[project]\[sub_project]\.git\bit\components\compilers\react-typescript\bit.envs\3.0.22\components\.dependencies\compilers\typescript\bit.envs\3.0.28\node_modules\execa\lib\error.js:58:11)
at handlePromise (C:\Users\[user]\src\[user]\[project]\[sub_project]\.git\bit\components\compilers\react-typescript\bit.envs\3.0.22\components\.dependencies\compilers\typescript\bit.envs\3.0.28\node_modules\execa\index.js:112:26)
at processTicksAndRejections (internal/process/task_queues.js:89:5)
Note that it works with 3.0.1.
Hi @seed-of-apricot, can you provide a repo to reconstruct your issue. Or an example to component content?
@qballer
An example component I uploaded can be found here.
This is one of the dependents of this component.
If it's not enough I will make a minimal repro.
I have tried react-typescript@3.0.21 and got this error.
images/logo
is an svg image that is imported byatoms/brand-logo
.I have also tested react-typescript@3.0.1 and it worked.
Is this a bug or an expected error? I will post additional info if needed.