Code Monkey home page Code Monkey logo

Comments (16)

marrobins avatar marrobins commented on May 17, 2024 6

@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.

webbertakken avatar webbertakken commented on May 17, 2024 2

@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.

ivesdebruycker avatar ivesdebruycker commented on May 17, 2024 1

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.

morloy avatar morloy commented on May 17, 2024

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.

webbertakken avatar webbertakken commented on May 17, 2024

@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.

marrobins avatar marrobins commented on May 17, 2024

@webbertakken no, we ended up moving away from Core UI because of this issue.

from coreui-free-react-admin-template.

xidedix avatar xidedix commented on May 17, 2024

@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.

webbertakken avatar webbertakken commented on May 17, 2024

Great 👍

Just add an version 2 alpha tag so we can try it out

image

from coreui-free-react-admin-template.

kernowal avatar kernowal commented on May 17, 2024

@marrobins I'm having the exact same issue with this. What did you decide on using instead?

from coreui-free-react-admin-template.

webbertakken avatar webbertakken commented on May 17, 2024

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.

vpn1997 avatar vpn1997 commented on May 17, 2024

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.

webbertakken avatar webbertakken commented on May 17, 2024

@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.

vpn1997 avatar vpn1997 commented on May 17, 2024

@webbertakken @marrobins Hey I tried to import DefaultLayout component in my existing React application , It renders this -

1

P.s This happens with every component that I import .
Any Idea what am i doing wrong 😢

from coreui-free-react-admin-template.

vpn1997 avatar vpn1997 commented on May 17, 2024

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.

vpn1997 avatar vpn1997 commented on May 17, 2024

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.

JoelESvensson avatar JoelESvensson commented on May 17, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.