cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
x001nx
Frequent Visitor

'ComponentFramework' is not defined.

Hi I am trying to follow this tutorial:

https://docs.microsoft.com/en-us/powerapps/developer/component-framework/implementing-controls-using...

I installed all the requirements and tried with Node 14 and node 12 but I am getting these errors:

 

> pcf-project@1.0.0 build C:\Projects\LinearInputControl
> pcf-scripts build

[4:07:06 PM] [build] Initializing...
[4:07:06 PM] [build] Validating manifest...
[4:07:06 PM] [build] Validating control...
[4:07:07 PM] [build] Generating manifest types...
[4:07:07 PM] [build] Generating design types...
[4:07:07 PM] [build] Compiling and bundling control...
[Webpack stats]:
Hash: 85e3b6d6b139276aae10
Version: webpack 4.42.1
Time: 1729ms
Built at: 08/31/2021 4:07:09 PM
Asset Size Chunks Chunk Names
bundle.js 6.97 KiB main [emitted] main
Entrypoint main = bundle.js
[./LinearInputControl/index.ts] 2.89 KiB {main} [built] [11 errors]

ERROR in C:\Projects\LinearInputControl\LinearInputControl\index.ts
./LinearInputControl/index.ts 35:35-47
[tsl] ERROR in C:\Projects\LinearInputControl\LinearInputControl\index.ts(35,36)
TS2339: Property 'controlValue' does not exist on type 'IInputs'.

ERROR in C:\Projects\LinearInputControl\LinearInputControl\index.ts
./LinearInputControl/index.ts 36:61-73
[tsl] ERROR in C:\Projects\LinearInputControl\LinearInputControl\index.ts(36,62)
TS2339: Property 'controlValue' does not exist on type 'IInputs'.

ERROR in C:\Projects\LinearInputControl\LinearInputControl\index.ts
./LinearInputControl/index.ts 36:105-117
[tsl] ERROR in C:\Projects\LinearInputControl\LinearInputControl\index.ts(36,106)
TS2339: Property 'controlValue' does not exist on type 'IInputs'.

ERROR in C:\Projects\LinearInputControl\LinearInputControl\index.ts
./LinearInputControl/index.ts 37:51-63
[tsl] ERROR in C:\Projects\LinearInputControl\LinearInputControl\index.ts(37,52)
TS2339: Property 'controlValue' does not exist on type 'IInputs'.

ERROR in C:\Projects\LinearInputControl\LinearInputControl\index.ts
./LinearInputControl/index.ts 37:95-107
[tsl] ERROR in C:\Projects\LinearInputControl\LinearInputControl\index.ts(37,96)
TS2339: Property 'controlValue' does not exist on type 'IInputs'.

ERROR in C:\Projects\LinearInputControl\LinearInputControl\index.ts
./LinearInputControl/index.ts 53:35-47
[tsl] ERROR in C:\Projects\LinearInputControl\LinearInputControl\index.ts(53,36)
TS2339: Property 'controlValue' does not exist on type 'IInputs'.

ERROR in C:\Projects\LinearInputControl\LinearInputControl\index.ts
./LinearInputControl/index.ts 55:61-73
[tsl] ERROR in C:\Projects\LinearInputControl\LinearInputControl\index.ts(55,62)
TS2339: Property 'controlValue' does not exist on type 'IInputs'.

ERROR in C:\Projects\LinearInputControl\LinearInputControl\index.ts
./LinearInputControl/index.ts 55:105-117
[tsl] ERROR in C:\Projects\LinearInputControl\LinearInputControl\index.ts(55,106)
TS2339: Property 'controlValue' does not exist on type 'IInputs'.

ERROR in C:\Projects\LinearInputControl\LinearInputControl\index.ts
./LinearInputControl/index.ts 56:51-63
[tsl] ERROR in C:\Projects\LinearInputControl\LinearInputControl\index.ts(56,52)
TS2339: Property 'controlValue' does not exist on type 'IInputs'.

ERROR in C:\Projects\LinearInputControl\LinearInputControl\index.ts
./LinearInputControl/index.ts 56:95-107
[tsl] ERROR in C:\Projects\LinearInputControl\LinearInputControl\index.ts(56,96)
TS2339: Property 'controlValue' does not exist on type 'IInputs'.

ERROR in C:\Projects\LinearInputControl\LinearInputControl\index.ts
./LinearInputControl/index.ts 61:3-28
[tsl] ERROR in C:\Projects\LinearInputControl\LinearInputControl\index.ts(61,4)
TS2322: Type '{ controlValue: number; }' is not assignable to type 'IOutputs'.
Object literal may only specify known properties, and 'controlValue' does not exist in type 'IOutputs'.
[pcf-scripts] [Error] encountered unexpected error:
Error: An error occurred compiling or bundling the control.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pcf-project@1.0.0 build: `pcf-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pcf-project@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

 

What could be the issue? Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
x001nx
Frequent Visitor

So the solution is:

  1. The typescript installation is missing.
  2. And the first thing to do is to run npm run build 

View solution in original post

5 REPLIES 5
x001nx
Frequent Visitor

So the solution is:

  1. The typescript installation is missing.
  2. And the first thing to do is to run npm run build 
Frances1
Regular Visitor

I'm getting the same error except it is 'Object literal may only specify known properties and 'controlValue' does not exist in type 'IOutputs'.  I did run npm build. Is there a known issue here or a release problem?

RoloMagnus
New Member

Curious to see the answer. I do have the same issue trying to set up a component for a bot in my canvas app.

RoloMagnus_0-1657671207448.png

This is the screenshot of my error. Thank you in advance for any support!

YazanGhafir
New Member

I'm having the same problem after downloading the repo: https://github.com/nijos/SmartGrid and trying to run it. Package.json doesn't exist and the compiler doesn't find ComponentFramework 

image.png

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,036)