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

Example of installing via webpack #38

Open
rafi opened this issue Dec 15, 2017 · 3 comments
Open

Example of installing via webpack #38

rafi opened this issue Dec 15, 2017 · 3 comments

Comments

@rafi
Copy link

rafi commented Dec 15, 2017

Hi, great work! I'm using create-react-app, and I tried installing fcui2 but I got errors.
Can you include an example of using with npm/yarn, ES6 classes and webpack?

@lbxx1984
Copy link
Collaborator

THS.
Now, we can install fcui2 from npm, like: npm install fcui2.
Then, use fcui2 in es6/webpack project like: import {Button} from 'fcui2'
Import less, @import '~fcui2/src/css/main.less'
Best Wishes.

@rafi
Copy link
Author

rafi commented Dec 15, 2017

@lbxx1984 when trying to use with import {Button} from 'fcui2' and loading in browser, I'm getting this exception:

×
Element ref was specified as a string (container) but no owner was set.
You may have multiple copies of React loaded. (details: https://fb.me/react-refs-must-have-owner).
▼ 26 stack frames were expanded.
invariant
node_modules/fbjs/lib/invariant.js:42
coerceRef
node_modules/react-dom/cjs/react-dom.development.js:6736
reconcileSingleElement
node_modules/react-dom/cjs/react-dom.development.js:7532
reconcileChildFibers
node_modules/react-dom/cjs/react-dom.development.js:7635
reconcileChildrenAtExpirationTime
node_modules/react-dom/cjs/react-dom.development.js:7756
reconcileChildren
node_modules/react-dom/cjs/react-dom.development.js:7747
finishClassComponent
node_modules/react-dom/cjs/react-dom.development.js:7881
updateClassComponent
node_modules/react-dom/cjs/react-dom.development.js:7850
beginWork
node_modules/react-dom/cjs/react-dom.development.js:8225
performUnitOfWork
node_modules/react-dom/cjs/react-dom.development.js:10224
workLoop
node_modules/react-dom/cjs/react-dom.development.js:10288
HTMLUnknownElement.callCallback
node_modules/react-dom/cjs/react-dom.development.js:542
invokeGuardedCallbackDev
node_modules/react-dom/cjs/react-dom.development.js:581
invokeGuardedCallback
node_modules/react-dom/cjs/react-dom.development.js:438
renderRoot
node_modules/react-dom/cjs/react-dom.development.js:10366
performWorkOnRoot
node_modules/react-dom/cjs/react-dom.development.js:11014
performWork
node_modules/react-dom/cjs/react-dom.development.js:10967
requestWork
node_modules/react-dom/cjs/react-dom.development.js:10878
scheduleWorkImpl
node_modules/react-dom/cjs/react-dom.development.js:10732
scheduleWork
node_modules/react-dom/cjs/react-dom.development.js:10689
scheduleTopLevelUpdate
node_modules/react-dom/cjs/react-dom.development.js:11193
updateContainer
node_modules/react-dom/cjs/react-dom.development.js:11231
(anonymous function)
node_modules/react-dom/cjs/react-dom.development.js:15226
unbatchedUpdates
node_modules/react-dom/cjs/react-dom.development.js:11102
renderSubtreeIntoContainer
node_modules/react-dom/cjs/react-dom.development.js:15225
render
node_modules/react-dom/cjs/react-dom.development.js:15290
▲ 26 stack frames were expanded.
./src/index.js
src/index.js:7
   4 | import App from './App';
   5 | import registerServiceWorker from './registerServiceWorker';
   6 | 
>  7 | ReactDOM.render(<App />, document.getElementById('root'));
   8 | registerServiceWorker();
   9 | 
  10 | 
View compiled
▼ 6 stack frames were expanded.
__webpack_require__
/Users/rafi/code/acme/webapp/webpack/bootstrap 2dcd94cf02452151090a:678
fn
/Users/rafi/code/acme/webapp/webpack/bootstrap 2dcd94cf02452151090a:88
0
http://localhost:3000/static/js/bundle.js:62202:18
__webpack_require__
/Users/rafi/code/acme/webapp/webpack/bootstrap 2dcd94cf02452151090a:678
./node_modules/ansi-regex/index.js.module.exports
/Users/rafi/code/acme/webapp/webpack/bootstrap 2dcd94cf02452151090a:724
(anonymous function)
http://localhost:3000/static/js/bundle.js:728:10
▲ 6 stack frames were expanded.
This screen is visible only in development. It will not appear if the app crashes in production.
Open your browser’s developer console to further inspect this error.

@lbxx1984
Copy link
Collaborator

It seems to be a compatibility problem.
Fcui2 is very old. We use react15.6.2 in project.
The upgrade is being carried out slowly.

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