-
Notifications
You must be signed in to change notification settings - Fork 1k
Setup your machine
The SharePoint Framework is currently in Preview, and is subject to change based on customer feedback. While we’re in preview, SharePoint Framework web parts are not supported for use in production environments.
In order to successfully complete the tutorials, you will need to setup your Mac or PC with the right tools.
You can use a Mac or PC to complete the tutorials.
-
NodeJS Long Term Support (LTS) version
- If you have NodeJS already installed please check you have the latest version using
node -v
. It should return the current LTS version. - If you are using a Mac, it is recommended you use homebrew to install and manage NodeJS.
- If you have NodeJS already installed please check you have the latest version using
If you are running on a PC, you need to install a couple more things - Visual Studio and Python.
-
If you are using Visual Studio:
- Visual Studio 2015
- Latest Visual Studio 2015 Update
- NodeJS Tools for Visual Studio
Here are some tools that might come in handy as well.
- Optional Tools:
Now that you have setup your dev environment, it is time to install Yeoman. Yeoman helps you to kick start new projects, prescribing best practices and tools to help you stay productive.
SharePoint client-side development tools includes a yeoman generator for creating new webparts and reference:
- Common build tools
- Common boilerplate code to help build webparts (base libraries)
- Common playground web site to host their webparts for testing purposes
Use the following console command to install Yeoman and Gulp:
npm i -g yo gulp
The Yeoman SharePoint WebPart generator lets you to quickly create a SharePoint client-side solution projects with the right tool chain and project structure.
Use the following console command to install SharePoint generator:
npm i -g @microsoft/generator-sharepoint
You may get the following error when you do yo @microsoft/sharepoint
> [email protected] install C:\Users\chakkaradeep\apps\helloworld-webpart\node_modules\bufferutil
> node-gyp rebuild
MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available tools versions are "4.0".
While the console reports an error, it is safe to ignore this error. The dependency bufferutil
tries to use MSBUILD to compile their tools and if not available, it uses its JavaScript tool instead, though it gives you an error.
In Windows, you may get the following error:
Failed at the [email protected] install script 'node install.js'.
This is because phantomjs
is not able to find python to run the script. To fix this issue, you will need to add python
directory to the PATH system environment variable and then close and reopen a new console session.
You are all set now to build SharePoint client-side solutions!
-
Getting Started