-
Notifications
You must be signed in to change notification settings - Fork 936
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
Error while Tagging the component with typescript #5106
Comments
I've just upgraded to latest bit
and on both versions I have the same error. I didn't expect the issue to be created by someone else 20 hours ago, Maybe it relates to microsoft/TypeScript#29808 (comment) |
I would imagine an example, but I am not sure if it's the reason. module A export function fnA() {
return {
anything: 'abc'
}
}
// inferring type from implementation that does not come to declaration file
export const a = new ClassA<ReturnType<typeof fnA>>; module B import { fnA } from 'moduleA';
export const b = fnA(); |
We faced this issue as well, and we need to look into it.
It will be great if you can post here back if it solves the issue. so we can have more info about it. |
Hi @GiladShoham it does not help, it's already configured to yarn package manager from the very start. |
This looks like a node_modules folder created by pnpm though: The issue that you referenced is related to symlinks. pnpm uses symlinks to reference dependencies of packages. With Yarn I assume no symlinks will be created in the capsule. |
@zkochan I believe these are the symlinks created by bit link (between capsules of components from the workspace) |
I'm wondering if the case of @uttam23 yarn will solve the issue. |
@ivansky If you can help us create a small repo with mock code that reproduces your issue, it will be very helpful for us. |
Hi @GiladShoham I've finally prepared a reproducible repo |
Thanks, we will look into it soon. |
This worked out nicely . Able to build the component .Thanks |
They look like different issues, first was just pnpm issue and the second one is about types are missing for some reason even with yarn. |
I don't have a solution for this. I'm able to reproduce it with the repo provided by @ivansky . I don't think it's related to |
Describe the bug
While trying to run the bit tag --all command for the first version of the component ,getting the following error .
⠀ **teambit.typescript/typescript, compile typescript components (1/1). base-ui/[email protected]
✖ /Users/uttam/Library/Caches/Bit/capsules/346cf4e76103ef106c4d9d60dc6f8edc73d0edfe/[email protected]/styles.ts:13:14 - error TS2742: The inferred type of 'cssStyle' cannot be named without a reference to '.pnpm/[email protected]/node_modules/jss'. This is likely not portable. A type annotation is necessary.
export const cssStyle = createUseStyles({
});**
Steps to Reproduce
1.using react-jss for css
`import { variantConstants } from "./constants";
import { createUseStyles } from "react-jss";
const commonProperties = (...values) => {
const [fontSize, fontWeight, lineHeight, letterSpacing] = values;
return {
fontSize,
fontWeight,
lineHeight:
${lineHeight}px
,letterSpacing,
};
};
export const cssStyle = createUseStyles({
/* Styles applied to the root element. */
root: {
margin: 0,
},
/* Styles applied to the root element if
variant="h1"
. */[variantConstants.H1]: commonProperties(42, 500, 56, "normal"),
});`
Expected Behavior
This error should not be coming and components should be tagged .
A clear and concise description of what you expected to happen.
Screenshots, exceptions and logs
If applicable, add screenshots, exceptions, and logs to help explain your problem.
Specifications
for harmony workspace
for leagacy
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: