fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

Having trouble with building the project since version 1.0.0

Open carruthe opened this issue 9 years ago • 5 comments

Bug Report

  • Package version(s): v1.0.0 and above
  • Browser and OS versions: MacOS 10.12.3

Describe the issue:

Since version 1.0.0 (when you split out @uifabric/utilities), I have been having difficulty with the build.

Actual behavior:

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.

Expected behavior:

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!

carruthe avatar Jan 25 '17 15:01 carruthe

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 avatar Jan 25 '17 16:01 dzearing

@dzearing - Thanks! Keep up the great work, this package has been my gateway drug to React, and I'm loving it.

carruthe avatar Jan 25 '17 16:01 carruthe

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 avatar Jan 25 '17 17:01 rgarita

@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!

dzearing avatar Jan 26 '17 00:01 dzearing

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.

dzearing avatar Jan 26 '17 03:01 dzearing