Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

fixed import, changed class name #421

Merged
merged 2 commits into from
Oct 10, 2017

Conversation

brndmg
Copy link

@brndmg brndmg commented Oct 2, 2017

I am very new to React. But, by trial and error I discovered that the offending line was:

<Select

Along with the message below, which I now assume is synonymous with 'class not found':

Element type is invalid: expected a string 
(for built-in components)

And the fact that the class was misnamed as BoardConfigItemView threw me for a loop since there is already a class with that name.

Closes #419

@brndmg
Copy link
Author

brndmg commented Oct 4, 2017

@andxu @testforstephen Can someone review this please?

@andxu
Copy link
Contributor

andxu commented Oct 5, 2017

We are on holiday in China, we will look on this PR when we are back at 10.9

@brndmg
Copy link
Author

brndmg commented Oct 5, 2017

Thanks for checking in. Have a good holiday!

@pedzed
Copy link

pedzed commented Oct 7, 2017

Thanks for the PR. This is a real blocker...

@@ -3,7 +3,7 @@

import * as React from "react";
import { Col, DropdownButton, Grid, Row } from "react-bootstrap";
import * as Select from "react-select";
Copy link
Contributor

@yaohaizh yaohaizh Oct 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this change. On the other hand, we need find out the root cause of this regression.

Could you help check the installed version of react-select on your local environment? It should be on the file of \src\views\node_modules\react-select\package.json file.

I think this might relate to the version change of react-select. If this is the case, we need fix down the react-select version for time being in the src\views\package.json ==> "react-select": "1.0.0-rc.10",

Copy link
Author

@brndmg brndmg Oct 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the \src\views\node_modules\react-select\package.json, I see the following.

"_resolved": "https://registry.npmjs.org/react-select/-/react-select-1.0.0-rc.10.tgz",
  "_shasum": "f137346250f9255c979fbfa21860899928772350",
  "_shrinkwrap": null,
  "_spec": "react-select@^1.0.0-rc.4",

In the \src\views\node_modules\react-select\src\index.js, I see this:

export default Select;
export {
	Async,
	AsyncCreatable,
	Creatable,
	Value
};

Which aligns to the 1.0.0-rc.10 version on GitHub. https://github.com/JedWatson/react-select/blob/v1.0.0-rc.10/src/index.js#L12

in contrast to the older version upon which the extension has a dependency 1.0.0-rc.4 https://github.com/JedWatson/react-select/tree/v1.0.0-rc.4/src/ which doesn't have an explicit export of Select.

I will modify the \src\views\package.json in my PR to reflect the explicit dependency on the correct version of react-select?

Also, is there a way to add gui tests so that this issue could be found by the test suite?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The root cause of this issue it that: though we have a package-lock.json file, we use the Node 6 (npm 3) in Travis CI, which does not respect the package-lock.json file.
To avoid similar issue happen again, we still need to keep the package-lock.json file, and update https://github.com/Microsoft/vscode-arduino/blob/master/.travis.yml#L4 to use node (latest stable Node.js release) instead of 6

@msftclas
Copy link

msftclas commented Oct 9, 2017

CLA assistant check
All CLA requirements met.

@yaohaizh yaohaizh merged commit b3e194a into microsoft:master Oct 10, 2017
@juankgp
Copy link

juankgp commented Oct 10, 2017

Sorry I try all changes but I dont have changes,so please could any one do a little manual
thanks

@yaohaizh
Copy link
Contributor

@brndmg Thanks a lo for your contribution. The PR was merged.

@brndmg @juankgp The issue is fixed on the latest version. Could you help verify if possible.

@brndmg
Copy link
Author

brndmg commented Oct 10, 2017

I can confirm that the new release Version 0.2.8 is now working for the Arduino: Board Configuration

@juankgp
Copy link

juankgp commented Oct 10, 2017

Thank you so much it work now

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

Successfully merging this pull request may close these issues.

9 participants