Topic: build in MDB Pro React 4.7.1 fails

patatagrammar pro asked 5 years ago


Running the command: yarn build Gets an error: yarn run v1.7.0 $ npm-run-all build-css build-original $ node-sass-chokidar src/ -o src/ Wrote 8 CSS files to /Users/mauricio/Projects/patatagrammar-web/src/ $ flow && react-scripts build No errors! Creating an optimized production build... Failed to compile. ./node_modules/mdbreact/dist/css/mdb.css Module build failed: ModuleBuildError: Module build failed: TypeError: Cannot read property 'length' of undefined at Array.forEach (<anonymous>) at <anonymous> Running directly NPM: ./node_modules/.bin/npm-run-all build-css build-original > patatagrammar-web@0.1.0 build-css /Users/mauricio/Projects/patatagrammar-web > node-sass-chokidar src/ -o src/ Wrote 8 CSS files to /Users/mauricio/Projects/patatagrammar-web/src/ > patatagrammar-web@0.1.0 build-original /Users/mauricio/Projects/patatagrammar-web > flow && react-scripts build No errors! Creating an optimized production build... Failed to compile. ./node_modules/mdbreact/dist/css/mdb.css Module build failed: ModuleBuildError: Module build failed: TypeError: Cannot read property 'length' of undefined at Array.forEach (<anonymous>) at <anonymous> npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! patatagrammar-web@0.1.0 build-original: `flow && react-scripts build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the patatagrammar-web@0.1.0 build-original script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /Users/mauricio/.npm/_logs/2018-09-11T12_32_03_333Z-debug.log And the file log is: 0 info it worked if it ends with ok 1 verbose cli [ '/Users/mauricio/.nvm/versions/node/v8.11.4/bin/node', 1 verbose cli '/Users/mauricio/.nvm/versions/node/v8.11.4/bin/npm', 1 verbose cli 'run', 1 verbose cli 'build-original' ] 2 info using npm@5.6.0 3 info using node@v8.11.4 4 verbose run-script [ 'prebuild-original', 'build-original', 'postbuild-original' ] 5 info lifecycle patatagrammar-web@0.1.0~prebuild-original: patatagrammar-web@0.1.0 6 info lifecycle patatagrammar-web@0.1.0~build-original: patatagrammar-web@0.1.0 7 verbose lifecycle patatagrammar-web@0.1.0~build-original: unsafe-perm in lifecycle true 8 verbose lifecycle patatagrammar-web@0.1.0~build-original: PATH: /Users/mauricio/.nvm/versions/node/v8.11.4/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/mauricio/Projects/patatagrammar-web/node_modules/.bin:/Users/mauricio/.nvm/versions/node/v8.11.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Applications/MySQLWorkbench.app/Contents/MacOS/:/Applications/MySQLWorkbench.app/Contents/MacOS/:/Applications/MySQLWorkbench.app/Contents/MacOS/ 9 verbose lifecycle patatagrammar-web@0.1.0~build-original: CWD: /Users/mauricio/Projects/patatagrammar-web 10 silly lifecycle patatagrammar-web@0.1.0~build-original: Args: [ '-c', 'flow && react-scripts build' ] 11 silly lifecycle patatagrammar-web@0.1.0~build-original: Returned: code: 1 signal: null 12 info lifecycle patatagrammar-web@0.1.0~build-original: Failed to exec build-original script 13 verbose stack Error: patatagrammar-web@0.1.0 build-original: `flow && react-scripts build` 13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (/Users/mauricio/.nvm/versions/node/v8.11.4/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16) 13 verbose stack at emitTwo (events.js:126:13) 13 verbose stack at EventEmitter.emit (events.js:214:7) 13 verbose stack at ChildProcess.<anonymous> (/Users/mauricio/.nvm/versions/node/v8.11.4/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at emitTwo (events.js:126:13) 13 verbose stack at ChildProcess.emit (events.js:214:7) 13 verbose stack at maybeClose (internal/child_process.js:925:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) 14 verbose pkgid patatagrammar-web@0.1.0 15 verbose cwd /Users/mauricio/Projects/patatagrammar-web 16 verbose Darwin 17.7.0 17 verbose argv "/Users/mauricio/.nvm/versions/node/v8.11.4/bin/node" "/Users/mauricio/.nvm/versions/node/v8.11.4/bin/npm" "run" "build-original" 18 verbose node v8.11.4 19 verbose npm v5.6.0 20 error code ELIFECYCLE 21 error errno 1 22 error patatagrammar-web@0.1.0 build-original: `flow && react-scripts build` 22 error Exit status 1 23 error Failed at the patatagrammar-web@0.1.0 build-original script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ] Thanks!

Michael White free commented 5 years ago

We're running into the exact same issue. An answer to this would be very much appreciated

Bhagya pro commented 5 years ago

We are facing the same issue, the pro version doesn't work.

Anna Morawska staff commented 5 years ago

Hello, sorry for the inconvenience, our team is working on it right now. We will inform you when this bug is resolved.

mpcooke4 pro answered 5 years ago


FYI I got caught out by this too, and for some reason it didn't originally occur during the build process, but I got a build that was broken once deployed. deleting and re-downloading node_modules triggered the error at build time and changing to the dev branch did fix it. Probably a good idea to get the fix in to the main branch before anyone else is caught out?

Anna Morawska staff commented 5 years ago

Hello, thanks for sharing your experience with us. Our team already have discovered that the problem was caused by small bug in the css file, so we fix this on branch dev. Unfortunately, we can't update master branch right now, according to our procedure it's going to be updated during the next release. Sorry for the inconvenience. Best, Ania

Anna Morawska staff answered 5 years ago


Hello, the bug is already fixed, the latest version of our package is on branch dev. Please adjust your git URL by adding #dev at the end, like this:
"mdbreact": git+https://oauth2:YOUR_TOKEN>@git.mdbootstrap.com/mdb/react/re-pro.git#dev"
Best, Ania

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB React
  • MDB Version: 4.7.0
  • Device: MacBook
  • Browser: none
  • OS: High Sierra
  • Provided sample code: No
  • Provided link: No