Since version 1.0.0 (when you split out @uifabric/utilities), I have been having difficulty with the build.
I ran, as per the instructions,..
git clone .....
cd office-ui-fabric-react
npm install
npm run
Hoever, I got a ton of errors, starting with "@uifabric/utilities" not found, then a ton of typescript errors.
It should build and run (not trying to be a smartass)
The Fix for me:
1. git clone https://github.com/OfficeDev/office-ui-fabric-react.git
2. cd office-ui-fabric-react
3. npm install react react-dom
4. npm install @uifabric/utilities
5. npm install
6. node_modules/.bin/rush rebuild -q (not sure if this is necessary)
7. npm start
Then it works!
Thanks!
Thanks; the problem is that the npm script needs a tweak. Just pulled latest in a clean enlistment last night to realize the npm start command also doesn't build fully.
This is the shortened build list is:
git clone <url> <dir>
cd <dir>
npm i
rush build
npm start
I will fix this asap.
@dzearing - Thanks!
Keep up the great work, this package has been my gateway drug to React, and I'm loving it.
Confirmed, workaround fixes the issue..., the only thing to keep in mind is update line 4 to node_modules\.bin\rush.cmd build if just rush build is not working
git clone <url> <dir>
cd <dir>
npm i
node_modules\.bin\rush.cmd build
npm start
@rgarita thanks; that's OS dependent; it's weird that Windows won't run the .bin stuff by default but Mac does. A nice workaround is that you can always install the rush tool globally;
npm i -g @microsoft/rush
I know that works on either platform.
@carruthe Awesome!
Alrighty we should be good now. I've significantly tweaked the build:
npm start now runs the "dev loop", which excludes running tests and linting for quick inner loop.
To run tests you can still run npm test to run all tests in the project. Or, if you go to a specific project you can run gulp test --production which should run tests. Note that i included the production flag requirement as a temporary workaround since the rush tool doesn't yet have support for passing through custom flags or having custom scripts defined in package.json.
Most helpful comment
Thanks; the problem is that the npm script needs a tweak. Just pulled latest in a clean enlistment last night to realize the npm start command also doesn't build fully.
This is the shortened build list is:
I will fix this asap.