Skip to content
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

I'm getting a "Type 'number' is not assignable to type 'ColumnWidth'" error when building #1372

Closed
designineer opened this issue Nov 18, 2018 · 10 comments
Assignees

Comments

@designineer
Copy link

I'm currently using node version 6.1.10 and npm version 3.10.10. When building a clone of the current release, I get the following build error.

'''Type 'number' is not assignable to type 'ColumnWidth'

This points to line 69 of /utils/AdaptiveCardBuilder class:

'''column.width = size;

Can someone point me to what could be causing this issue? I have a feeling it's got something to do with my typescript version or other builder tools.

@corinagum corinagum added v3 Deprecated v3 version and removed v3 Deprecated v3 version labels Nov 29, 2018
@corinagum
Copy link
Contributor

Can you verify that you are using Node v10 and the latest npm when building? Unfortunately we don't support Node 6.x for building the web project.

@corinagum
Copy link
Contributor

closing due to inactivity

@live-abhishek
Copy link

live-abhishek commented Jan 10, 2019

I am also getting the same error when running build command npm run build

botframework-webchat-component: src/Utils/AdaptiveCardBuilder.ts:69:7 - error TS2322: Type 'number' is not assignable to type 'ColumnWidth'. botframework-webchat-component: 69 column.width = size;

I am using node v10.15.0 and npm 6.5.0 on Windows10
I am running following commands (as per the docs) to build the project

npm install
npm run bootstrap
npm run build

@corinagum corinagum reopened this Jan 10, 2019
@live-abhishek
Copy link

Yesterday, when performing the steps I was using Windows 10. I tried again in Ubuntu Machine, and it worked (barring some number of watch file limit errors).

Although I don't think this problem has anything to do with OS, but still want to share my findings.

@compulim
Copy link
Contributor

compulim commented Jan 11, 2019

Adaptive Cards 1.1 introduced a breaking change. number was supported in columnWidth. But in 1.1, they forced to use a custom type named Unit.

We bumped to [email protected] in PR #1558:

  • Fixed the columnWidth to use Unit instead of number
  • Locked down to minor version (@~1.1.2 instead of @^1.1.2)

As you are probably working on Git, pull the latest master and everything should be fine.

@live-abhishek
Copy link

Hey, that works. Silly me should have taken pull.

@live-abhishek
Copy link

Also can you help me with how to debug webchat code?
Here is SO question link https://stackoverflow.com/questions/54135827/how-to-debug-botframework-webchat-workspace-code/54152964#54152964

@compulim
Copy link
Contributor

@live-abhishek I hit the very same problem when we bump Adaptive Cards. 😛

Will look at your Stack Overflow issue.

@compulim
Copy link
Contributor

Looks like @corinagum answered.

It seems debugging thru HTML is possible. But not debugging thru playground (or possibly other React apps). Need some investigations over here.

@corinagum
Copy link
Contributor

#1595

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants