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

The newest version doesn't compile on Windows. #26

Closed
KirannBhavaraju opened this issue Oct 1, 2021 · 3 comments
Closed

The newest version doesn't compile on Windows. #26

KirannBhavaraju opened this issue Oct 1, 2021 · 3 comments

Comments

@KirannBhavaraju
Copy link

KirannBhavaraju commented Oct 1, 2021

Hey guys, I have all the dependencies installed. and all the paths set so that these things are found..

  • yarn
  • rimraf
  • mage
  • npm
  • go

Yarn build however doesnt compile and throws a Type A not assignable to Type B error on my windows machine..

PS C:\Users\kib\Desktop\Projects\mqtt datasource for grafana\grafana-plugins\mqtt-datasource> yarn build
yarn run v1.22.15
warning ..\..\..\..\..\package.json: No license field
$ rm -rf dist && grafana-toolkit plugin:build && mage build:backend
'rm' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
PS C:\Users\kib\Desktop\Projects\mqtt datasource for grafana\grafana-plugins\mqtt-datasource> yarn build
yarn run v1.22.15
warning ..\..\..\..\..\package.json: No license field
$ rimraf dist && grafana-toolkit plugin:build && mage build:backend
  Using Node.js v16.5.0
  Using @grafana/toolkit v8.2.0-beta.2
√ Preparing
√ Linting
 PASS  src/handleEvent.test.ts

Test Suites: 1 passed, 1 total
Tests:       2 passed, 2 total
Snapshots:   2 passed, 2 total
Time:        5.271 s
Ran all test suites with tests matching "".
√ Running tests
- Compiling...  Starting type checking service...
  Using 1 worker with 2048MB memory limit
- Compiling...  ERROR in C:/Users/kib/Desktop/Projects/mqtt datasource for grafana/grafana-plugins/mqtt-datasource/src/ConfigEditor.tsx(53,17):
  TS2322: Type '{ name: string; required: true; value: string; css: string; autoComplete: string; onChange: (event: ChangeEvent<HTMLInputElement>) => void; }' is not assignable to type 'IntrinsicAttributes & Pick<Props, "onSubmit" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | ... 354 more ... | "addonAfter"> & RefAttributes<...>'.
    Property 'css' does not exist on type 'IntrinsicAttributes & Pick<Props, "onSubmit" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | ... 354 more ... | "addonAfter"> & RefAttributes<...>'.
  ERROR in C:/Users/kib/Desktop/Projects/mqtt datasource for grafana/grafana-plugins/mqtt-datasource/src/ConfigEditor.tsx(64,17):
  TS2322: Type '{ type: string; name: string; required: true; value: number; css: string; autoComplete: string; onChange: (event: ChangeEvent<HTMLInputElement>) => void; }' is not assignable to type 'IntrinsicAttributes & Pick<Props, "onSubmit" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | ... 354 more ... | "addonAfter"> & RefAttributes<...>'.
    Property 'css' does not exist on type 'IntrinsicAttributes & Pick<Props, "onSubmit" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | ... 354 more ... | "addonAfter"> & RefAttributes<...>'.
  ERROR in C:/Users/kib/Desktop/Projects/mqtt datasource for grafana/grafana-plugins/mqtt-datasource/src/ConfigEditor.tsx(76,17):
  TS2322: Type '{ name: string; value: string | undefined; css: string; autoComplete: string; onChange: (event: ChangeEvent<HTMLInputElement>) => void; }' is not assignable to type 'IntrinsicAttributes & Pick<Props, "onSubmit" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | ... 354 more ... | "addonAfter"> & RefAttributes<...>'.
    Property 'css' does not exist on type 'IntrinsicAttributes & Pick<Props, "onSubmit" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | ... 354 more ... | "addonAfter"> & RefAttributes<...>'.
  ERROR in C:/Users/kib/Desktop/Projects/mqtt datasource for grafana/grafana-plugins/mqtt-datasource/src/ConfigEditor.tsx(85,17):
  TS2322: Type '{ type: string; name: string; css: string; autoComplete: string; placeholder: string; value: string; onChange: (event: ChangeEvent<HTMLInputElement>) => void; onReset: () => void; }' is not assignable to type 'IntrinsicAttributes & Pick<Props, "onSubmit" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | ... 354 more ... | "addonAfter"> & RefAttributes<...>'.
    Property 'css' does not exist on type 'IntrinsicAttributes & Pick<Props, "onSubmit" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | ... 354 more ... | "addonAfter"> & RefAttributes<...>'.
  ERROR in C:/Users/kib/Desktop/Projects/mqtt datasource for grafana/grafana-plugins/mqtt-datasource/src/QueryEditor.tsx(22,13):
  TS2322: Type '{ name: string; required: true; value: string | undefined; css: string; autoComplete: string; onChange: (event: ChangeEvent<HTMLInputElement>) => void; }' is not assignable to type 'IntrinsicAttributes & Pick<Props, "onSubmit" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | ... 354 more ... | "addonAfter"> & RefAttributes<...>'.
    Property 'css' does not exist on type 'IntrinsicAttributes & Pick<Props, "onSubmit" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | ... 354 more ... | "addonAfter"> & RefAttributes<...>'.
× Build failed
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Faulty files

  1. src\configEditor.tsx
  • image
  1. src\QueryEditor.tsx

Versions

  1. Yarn : v1.22.15
  2. Go : go1.17.1 windows/amd64
  3. Mage: Mage Build Tool v1.11.0-4-gdd94424, Commit: dd94424
  4. Node: v16.5.0
@atifali
Copy link
Contributor

atifali commented Jan 6, 2022

@KirannBhavaraju i just tried building the datasource from source on my windows machine with the following tool versions:

  1. yarn: 1.22.17
  2. Go: go version go1.17.6 windows/amd64
  3. Mage: Mage Build Tool v1.12.1; Commit: 2f1ec40
  4. Node: v16.13.1

it compiles fine on my end - do you mind updating your local tools and then trying again? maybe its just a version issue

@KirannBhavaraju
Copy link
Author

@atifali Yeah, you use newer versions of every dependency almost. I wrote the issue 3 mo ago.. which was the case then. I did not try it recently..

but nice to see it is fixed.

@atifali
Copy link
Contributor

atifali commented Jan 9, 2022

@KirannBhavaraju cool yeah if you do want to give this another shot i would suggest using those versions and report back if any issues - closing this now

@atifali atifali closed this as completed Jan 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants