Comments (8)
Have You installed 'react-responsive' in Your project?
In some cases this dependency is causing similiar problems.
from mdb-react-ui-kit.
No
My complete list is as follows
"dependencies": {
"es6-promise": "^4.2.4",
"isomorphic-fetch": "^2.2.1",
"mdbreact": "git+https://github.com/mdbootstrap/React-Bootstrap-with-Material-Design.git",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"reflux": "^6.4.1"
},
"devDependencies": {
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"babelify": "^7.3.0",
"browserify": "^14.5.0",
"copyfiles": "^1.2.0",
"envify": "^4.1.0",
"eslint": "^4.16.0",
"eslint-plugin-react": "^7.7.0",
"express": "^4.16.2",
"node-sass": "^4.7.2",
"nodemon": "^1.14.11",
"parallelshell": "^2.0.0",
"uglify-es": "^3.3.9",
"uglifyify": "^4.0.5",
"watch": "^1.0.2"
}
from mdb-react-ui-kit.
Can You add new devDependency called 'prop-types' (https://www.npmjs.com/package/prop-types)?
There is a chance that it wil fix Your issue. If not, we'll try to find another solution.
from mdb-react-ui-kit.
no luck, unfortunately
$ npm install prop-types --save-dev
+ [email protected]
updated 1 package in 9.505s
$ npm run build:js
> [email protected] build:js /Users/...
> browserify index.js -t [ babelify --presets [ env react ] ] -o build/web-bundle.js
Error: Cannot find module './factoryWithThrowingShims' from '/Users/.../node_modules/mdbreact/dist'
from mdb-react-ui-kit.
I have no experience with webpack, but can the error be between webpack and browserify?
I use browserify in my project, but mdbreact uses webpack
I can run the downloaded files just fine, but due to my complete lack of knowledge when it comes to webpack, I am hesitant as to move to my project to webpack, even though this could possibly be a workaround to the issues
I have tried editing the dist/mdbreact.js - but this just results in brand new errors that I didn't see coming, and it seems to be quite counterintuitive to have to edit stuff in the node_modules folder
from mdb-react-ui-kit.
It is very likely that browserify is not compatible with webpack settings and that is causing problems. In the standard configured project (based on webpack) such error does not appear.
from mdb-react-ui-kit.
I ran across this post while doing some digging for a similar issue on a different project and I think I might know what's going on.
mdbreact uses 'prop-types' but the library isn't listed in the packages.json. If you look at the compiled mdbreact.js in dist, you'll notice an interesting piece of code compiled by webpack:
if (true) {
...
// By explicitly using `prop-types` you are opting into new development behavior.
// http://fb.me/prop-types-in-prod
var throwOnDirectAccess = true;
module.exports = __webpack_require__(57)(isValidElement, throwOnDirectAccess);
} else {
// By explicitly using `prop-types` you are opting into new production behavior.
// http://fb.me/prop-types-in-prod
module.exports = require('./factoryWithThrowingShims')();
}
When dealing with externals, they should be added to the webpack config. I found a similar issue here.
If you add the following to the externals in mdbreact's webpack config, it should fix the issue.
"prop-types": {
root: 'PropTypes',
commonjs2: 'prop-types',
commonjs: 'prop-types',
amd: 'prop-types',
}
from mdb-react-ui-kit.
Fixed
from mdb-react-ui-kit.
Related Issues (20)
- Broken MDBCollapse component in version 2.1.0 HOT 1
- Dropdown menu position issue HOT 1
- TimePicker can not get the value I set HOT 1
- ReferenceError: document is not defined HOT 1
- Replace 'transition-property' with 'transition' HOT 2
- MDBDropdown has issue when using in react-styleguidist HOT 6
- Question: mdbreact vs mdb-react-ui-kit - which package is better? HOT 4
- cli is looking for react v17 HOT 1
- Runtime error HOT 1
- MDBModal keeps display:block after 2nd time closed HOT 7
- Module parse failed error HOT 2
- MDBCollapse keep height after animation ends HOT 2
- MDBCollapse does not have onHide and onShow events HOT 3
- uncaught TypeError: Failed to execute 'getComputedStyle' occurs and keeps racking up but doesnt crash anything HOT 7
- Failed to execute 'getComputedStyle' on 'Window' HOT 1
- Using MDBootstrap with next.js App Router HOT 1
- Error when installed version of chart.js is > 4.3.3
- Uncaught TypeError when setting leaveHiddenModal to false on MDBModal HOT 1
- Community & Migration HOT 1
- Warning in the console for MDBDataTable from mdbreact
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 mdb-react-ui-kit.