Closed benoitkopp closed 6 years ago
I noticed in their project they used an alias that points to where the /src directory lives in the resolve section of the webpack config.
resolve: { alias: { mdbreact: path.resolve('./src/index') } },
@carlgrimm so what is the solution ? I don't get it. same issue for me
One way is to get an alias into the resolve config section of your webpack configuration file if you are using webpack to build.
This repo builds the docs site using webpack and you can see in their configuration file that they create a resolve alias that maps mdbreact to the components they export in /src/index.js which fixes this en-mass for all of the components.
it also appears that the git repo might be out of sync with NPM package. The git repo has an index.js file that helps load everything that seems to be missing when you add from NPM.
I'm having the same problem. I tried installing from NPM and from Github download, but couldn't get it to work.
Anyone find out exactly what needs to be done to solve this?
It's fixed in 4.1.0
@mattonit it's not fixed..still i'm getting this issue..please help me to solve it..
what's your version of React?
16.2.0
Hello, This error which could be connected with the latest upgrade of React. We've fixed it by updating our product to the latest React version. Please delete 'mdbreact' from package.json, reinstall and then add to dependencies this line:
"mdbreact":"git+https://github.com/mdbootstrap/React-Bootstrap-with-Material-Design.git#react-upgrade"
Let us know if it works properly.
Regards
still not working..
its giving multiple errors now..jquery not defined..when i'm trying to test by copying the navbar code..'navbar' has no owner...such things..
Please build a new React App and check our mdbreact with it. It's not possible to see jquery errors because it's not working with jquery, but with plain js. If it's still not working please write what are Your steps to create this App.
I created a new project through: create-react-app myproject Then after installation..i ran the command: npm install --save mdbreact And when i copied the code of navbar for testing purpose..it gave me that error..did i miss something?
Sent from my Windows Phone
-----Original Message----- From: "m_smolenski" notifications@github.com Sent: 21/02/2018 02:14 PM To: "mdbootstrap/React-Bootstrap-with-Material-Design" React-Bootstrap-with-Material-Design@noreply.github.com Cc: "Hamza Iqbal Mallick" hiqbalmallick@gmail.com; "Comment" comment@noreply.github.com Subject: Re: [mdbootstrap/React-Bootstrap-with-Material-Design] Can't resolve'mdbreact' (#8)
Please build a new React App and check our mdbreact with it. It's not possible to see jquery errors because it's not working with jquery, but with plain js. If it's still not working please write what are Your steps to create this App. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
Is there a fix for this? I'm having the same issue
Haven't found yet..
Sent from my Windows Phone
-----Original Message----- From: "Iain Richardson" notifications@github.com Sent: 27/02/2018 11:12 PM To: "mdbootstrap/React-Bootstrap-with-Material-Design" React-Bootstrap-with-Material-Design@noreply.github.com Cc: "Hamza Iqbal Mallick" hiqbalmallick@gmail.com; "Comment" comment@noreply.github.com Subject: Re: [mdbootstrap/React-Bootstrap-with-Material-Design] Can't resolve'mdbreact' (#8)
Is there a fix for this? I'm having the same issue — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
Having this same issue.
I'm having the same error.
Since new updates, it's working, which version do you use ?
Still importing like:
import { Button, Modal, ModalBody, ModalHeader } from 'mdbreact'; I'm running it on an older version (4.3.0) with React 16.3.2 and it works great :)
Is there a solution to this yet? Still having the same issue with mdbreact 4.8.3
If you have problem with installation please check out our support forum, or open new issue.
This issue is closed and not tracked.
У меня та же ошибка.
ERROR in ./src/components/Boxes.js Module not found: Error: Can't resolve 'mdbreact' in 'C:\Users\User\Desktop\react2\src\components' @ ./src/components/Boxes.js 19:16-35 @ ./src/components/App.js @ ./src/index.js @ multi (webpack)-dev-server/client?http://localhost:9000 webpack/hot/dev-server ./src/index.js
same issue, module not found. Could not find a declaration file for module 'mdbreact'. '/Users/feri/Documents/amartha/react-p2p/app/node_modules/mdbreact/dist/mdbreact.js' implicitly has an 'any' type.
Hello @ferryal ! Here is what solved the problem for me: Run the following commands:
// Modify the ReactDOM.render() to the below
ReactDOM.render(
, document.getElementById('root'));
This worked for me
const mdbreact = require('mdbreact'); const { Button, Collapse } = mdbreact;
Taken from StackOverflow
Step 1 npm install --save mdbreact
Step 2
Import style files into the src/index.js before the App.js file import:
index.js import '@fortawesome/fontawesome-free/css/all.min.css'; import 'bootstrap-css-only/css/bootstrap.min.css'; import 'mdbreact/dist/css/mdb.css';
Step 3
Run your app
Terminal npm start
Hello,
When i try to import Button and Collapse, i get:
Import:
import { Button, Collapse } from 'mdbreact';
Error:
Module not found: Can't resolve 'mdbreact' in 'C:\wamp64\www\bob-web\notice-cmi\src\components\Collapsable'
I installed it with npm. Did i miss something ?