material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

Problems with building the source code on Windows

Open antansk opened this issue 11 years ago • 1 comments

Hey,

I'm working with material-ui in a project and I have found few bugs that I would like to fix myself so I made my own fork. I thought using my own fork would be as simple as changing in my projects package.json dependency to "material-ui" : "corvuscornix/material-ui" but it turned out that I need to build the code myself (and commit my compiled code before the library can be used?). I'm having tons of problems with building the code on windows. I get i.e. following errors:

  1. "The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters."
  • I put the cloned repo into C:\material_ui and was able to get over of this problem
  1. "'rm' is not recognized as an internal or external command, operable program or batch file."
  • I changed rm to rd in package.json to get over this problem
  1. "c1 : fatal error C1083: Cannot open source file: '..............................\Program Files\iojs\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.c': No such file or directory [C:\temp\material-ui\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\utf-8-validate\build\validation.vcxproj]"
  • I'm using iojs, is that a problem? I'm using cmd as Administrator so it cant be access right problem. I got over this problem just running the npm install a second time so it actually compiled the js files without giving this error.

And finally I get this error when I try to run the dev server after compiling the code succesfully and manually copying the /lib to my projects node_modules/material-ui. As mentioned above, I'm using cmd as Administrator: npm ERR! path C:\material_ui_upgrade\node_modules\material-ui\node_modules\karma \node_modules\lodash\lang\isError.js npm ERR! code EPERM npm ERR! errno -4048 npm ERR! syscall unlink

npm ERR! Error: EPERM: operation not permitted, unlink 'C:\material_ui_upgrade\n ode_modules\material-ui\node_modules\karma\node_modules\lodash\lang\isError.js' npm ERR! at Error (native) npm ERR! { [Error: EPERM: operation not permitted, unlink 'C:\material_ui_upgra de\node_modules\material-ui\node_modules\karma\node_modules\lodash\lang\isError. js'] npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'unlink', npm ERR! path: 'C:\material_ui_upgrade\node_modules\material-ui\node_modul es\karma\node_modules\lodash\lang\isError.js' } npm ERR! npm ERR! Please try running this command again as root/Administrator.

The question is: How are you supposed to develop on windows machine?

antansk avatar Aug 11 '15 13:08 antansk

please retry with npm version 3+ this might be fixed. if it still persists feel free to reopen, thank you.

alitaheri avatar Dec 06 '15 22:12 alitaheri