Comments (16)
@morloy thanks for clarifying. That is helpful to know the latest version is deployed to NPM, but the core problem remains. The project is still not easily imported as a dependency into an existing project.
from coreui-free-react-admin-template.
@vpn1997 Looks like a big part is working already. At least you got it to compile. I think your styles aren't loaded.
Probably you're missing a style tag in your markup.
You should include the styles so it comes along during transpiring with babel. When it enters your build folder you still have to reference it in your markup. Also make sure it resides in a public folder.
Also make sure you have version 2.x.x of the package not the 1.x.x version.
It would be nice if you addressed the community rather than me personally next time :)
from coreui-free-react-admin-template.
This worked for my project:
yarn add @coreui/styles@next
yarn add @coreui/react@next
And then:
@import 'variables';
// Import styles
@import "~@coreui/styles/scss/coreui";
// Temp fix for reactstrap
@import '~@coreui/styles/scss/_dropdown-menu-right.scss';
@import 'custom';
and
import { AppHeaderDropdown, AppNavbarBrand, AppSidebarToggler } from '@coreui/react';
...
Is working great for me so far..
from coreui-free-react-admin-template.
I think the NPM package has changed.
At least there's @coreui/react which is up to date with the current GitHub.
from coreui-free-react-admin-template.
@marrobins do you have a working configuration for this that you could maybe share? I'm having some trouble getting this to work in webpack encore.
from coreui-free-react-admin-template.
@webbertakken no, we ended up moving away from Core UI because of this issue.
from coreui-free-react-admin-template.
@webbertakken please take a look at https://github.com/mrholek/CoreUI-React/tree/v2.0.0 - it is a work in progress but shows direction we are heading.
from coreui-free-react-admin-template.
Great 👍
Just add an version 2 alpha tag so we can try it out
from coreui-free-react-admin-template.
@marrobins I'm having the exact same issue with this. What did you decide on using instead?
from coreui-free-react-admin-template.
I got it to work too. It's still a ton of work to figure out all the things that didn't work out of the box, especially if you want run the Full
component on top of it. In that case there's also dependencies missing from the main package and styles missing from the styles package.
I ended up making quite a few changes in 10 files together, so i won't copy paste them here. If anyone needs some help or has any specific questions i might be able to help out.
from coreui-free-react-admin-template.
hey @marrobins @webbertakken I want to integrate this with one of my existing react application.I am having trouble in figuring out a workflow to do so.Can any one help me out here ?
from coreui-free-react-admin-template.
@vpn1997 ivesdebruycker gave an answer that should get you halfway there.
could you be more specific about what you're trying to do? And what have you got now?
from coreui-free-react-admin-template.
@webbertakken @marrobins Hey I tried to import DefaultLayout
component in my existing React application , It renders this -
P.s This happens with every component that I import .
Any Idea what am i doing wrong 😢
from coreui-free-react-admin-template.
I am not using the coreui npm package rather I have cloned coreui repo(inside my react app) from which I Import all the components. CoreUi npm package was not working for me .(https://www.npmjs.com/package/@coreui/react) .
I have raised an Issue related to the same problem.
(#83)
from coreui-free-react-admin-template.
import { DefaultLayout } from '@coreui/react';
this gives me
React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
error
from coreui-free-react-admin-template.
@vpn1997 I had a similar error which I solved by updating my react to 16.4.1
from coreui-free-react-admin-template.
Related Issues (20)
- Unable to upload changed project into a personal reposatory HOT 1
- Replace color-adjust to print-color-adjust HOT 1
- Autho integration with core ui appending wrong url. Same working fine with normal react app. HOT 1
- Pro typescript issue HOT 5
- cannot use React.useMemo HOT 1
- Tooltip position issue HOT 1
- Animation CCollapse at CSmartTable Doesn`t Work HOT 1
- npm run build failed HOT 4
- How can I put the itemsPerPageSelect to bottom of CDataTable? HOT 1
- Failed to compile on npm build HOT 2
- How to enable sidebar open by default on mobile devices? HOT 1
- React router dom v6 BrowserRouter not working on build version HOT 1
- `CNavGroup` icons not working on Coreui Free Admin Template ReactJS 4.3.0 HOT 1
- Dependency issue with "react-scripts" package HOT 1
- Modal (CModal) Closing Unexpectedly HOT 4
- Hash route not working in production mode HOT 1
- Template stops responding after a while on iPhone 12 HOT 2
- Config url # HOT 3
- Sidebar Opening and Closing Infinitely on Resizing
- Clean install. Navigation (buttons do not work). HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coreui-free-react-admin-template.