Coder Social home page Coder Social logo

sharepoint / sp-dev-docs Goto Github PK

View Code? Open in Web Editor NEW
1.2K 1.2K 988.0 301.44 MB

SharePoint & Viva Connections Developer Documentation

Home Page: https://docs.microsoft.com/en-us/sharepoint/dev/

License: Creative Commons Attribution 4.0 International

PowerShell 100.00%

sp-dev-docs's People

Contributors

ajford76 avatar ajixumuk avatar andrewconnell avatar annmariehitchcock avatar arakeshmicrosoft avatar chakkaradeep avatar chcoml avatar chrisms86 avatar cindylay avatar davidchesnut avatar dereklh7 avatar dhurataj avatar farreltinf avatar jansenbe avatar jarbashorst avatar jmart1428 avatar joannehendrickson avatar koenzomers avatar lauragra avatar linda-editor avatar lucabandmsft avatar msarts avatar nanddeepn avatar prasadkasireddy avatar seansquires avatar seiyasu avatar shagra-ms avatar thechriskent avatar vesajuvonen avatar waldekmastykarz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sp-dev-docs's Issues

Cannot install framework - fails at Yeoman SharePoint Generator step

Running this command from the wiki:
npm i -g @microsoft/generator-sharepoint
fails. Log file pasted below.

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\ProgramData\chocolatey\lib\npm\tools\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'i',
1 verbose cli '-g',
1 verbose cli '@microsoft/generator-sharepoint',
1 verbose cli '--no-optional' ]
2 info using [email protected]
3 info using [email protected]
4 verbose cache add [ '@microsoft/generator-sharepoint', null ]
5 verbose cache add name=undefined spec="@microsoft/generator-sharepoint" args=["@microsoft/generator-sharepoint",null]
6 verbose parsed url Url {
6 verbose parsed url protocol: null,
6 verbose parsed url slashes: null,
6 verbose parsed url auth: null,
6 verbose parsed url host: null,
6 verbose parsed url port: null,
6 verbose parsed url hostname: null,
6 verbose parsed url hash: null,
6 verbose parsed url search: null,
6 verbose parsed url query: null,
6 verbose parsed url pathname: '@microsoft/generator-sharepoint',
6 verbose parsed url path: '@microsoft/generator-sharepoint',
6 verbose parsed url href: '@microsoft/generator-sharepoint' }
7 verbose cache add name="" spec="microsoft/generator-sharepoint" args=["","microsoft/generator-sharepoint"]
8 verbose parsed url Url {
8 verbose parsed url protocol: null,
8 verbose parsed url slashes: null,
8 verbose parsed url auth: null,
8 verbose parsed url host: null,
8 verbose parsed url port: null,
8 verbose parsed url hostname: null,
8 verbose parsed url hash: null,
8 verbose parsed url search: null,
8 verbose parsed url query: null,
8 verbose parsed url pathname: 'microsoft/generator-sharepoint',
8 verbose parsed url path: 'microsoft/generator-sharepoint',
8 verbose parsed url href: 'microsoft/generator-sharepoint' }
9 silly lockFile 8e76695a-microsoft-generator-sharepoint microsoft/generator-sharepoint
10 verbose lock microsoft/generator-sharepoint C:\Users\Paul\AppData\Roaming\npm-cache\8e76695a-microsoft-generator-sharepoint.lock
11 info maybeGithub Attempting microsoft/generator-sharepoint from git://github.com/microsoft/generator-sharepoint
12 silly lockFile 171b9617-m-microsoft-generator-sharepoint git://github.com/microsoft/generator-sharepoint
13 verbose lock git://github.com/microsoft/generator-sharepoint C:\Users\Paul\AppData\Roaming\npm-cache\171b9617-m-microsoft-generator-sharepoint.lock
14 verbose addRemoteGit [ 'git://github.com/microsoft/generator-sharepoint', 'master' ]
15 warn git config --get remote.origin.url returned wrong result (git://github.com/microsoft/generator-sharepoint) https://github.com/CalamityLorenzo/IamgeekSpoConfig.git
16 verbose git clone git://github.com/microsoft/generator-sharepoint Cloning into bare repository 'C:\Users\Paul\AppData\Roaming\npm-cache_git-remotes\git-github-com-microsoft-generator-sharepoint-171b9617'...
16 verbose git clone git://github.com/microsoft/generator-sharepoint fatal: remote error:
16 verbose git clone git://github.com/microsoft/generator-sharepoint Repository not found.
17 silly lockFile 171b9617-m-microsoft-generator-sharepoint git://github.com/microsoft/generator-sharepoint
18 silly lockFile 171b9617-m-microsoft-generator-sharepoint git://github.com/microsoft/generator-sharepoint
19 info maybeGithub Attempting microsoft/generator-sharepoint from git+ssh://[email protected]:microsoft/generator-sharepoint
20 silly lockFile 7880b29f-m-microsoft-generator-sharepoint [email protected]:microsoft/generator-sharepoint
21 verbose lock [email protected]:microsoft/generator-sharepoint C:\Users\Paul\AppData\Roaming\npm-cache\7880b29f-m-microsoft-generator-sharepoint.lock
22 verbose addRemoteGit [ '[email protected]:microsoft/generator-sharepoint', 'master' ]
23 warn git config --get remote.origin.url returned wrong result ([email protected]:microsoft/generator-sharepoint) https://github.com/CalamityLorenzo/IamgeekSpoConfig.git
24 error git clone [email protected]:microsoft/generator-sharepoint Cloning into bare repository 'C:\Users\Paul\AppData\Roaming\npm-cache_git-remotes\git-github-com-microsoft-generator-sharepoint-7880b29f'...
24 error git clone [email protected]:microsoft/generator-sharepoint Host key verification failed.
24 error git clone [email protected]:microsoft/generator-sharepoint fatal: Could not read from remote repository.
24 error git clone [email protected]:microsoft/generator-sharepoint
24 error git clone [email protected]:microsoft/generator-sharepoint Please make sure you have the correct access rights
24 error git clone [email protected]:microsoft/generator-sharepoint and the repository exists.
25 silly lockFile 7880b29f-m-microsoft-generator-sharepoint [email protected]:microsoft/generator-sharepoint
26 silly lockFile 7880b29f-m-microsoft-generator-sharepoint [email protected]:microsoft/generator-sharepoint
27 silly lockFile 8e76695a-microsoft-generator-sharepoint microsoft/generator-sharepoint
28 silly lockFile 8e76695a-microsoft-generator-sharepoint microsoft/generator-sharepoint
29 error addLocal Could not install microsoft/generator-sharepoint
30 error Error: ENOENT: no such file or directory, stat 'D:\code\microsoft\generator-sharepoint'
30 error at Error (native)
31 error If you need help, you may report this entire log,
31 error including the npm and node versions, at:
31 error http://github.com/npm/npm/issues
32 error System Windows_NT 10.0.10586
33 error command "C:\Program Files\nodejs\node.exe" "C:\ProgramData\chocolatey\lib\npm\tools\node_modules\npm\bin\npm-cli.js" "i" "-g" "@microsoft/generator-sharepoint" "--no-optional"
34 error cwd D:\code
35 error node -v v5.10.1
36 error npm -v 1.4.9
37 error path D:\code\microsoft\generator-sharepoint
38 error syscall stat
39 error code ENOENT
40 error errno -4058
41 verbose exit [ -4058, true ]

Tutorial 2 MockHttpClient Data Unused

I noticed that in the section of Tutorial 2 where you build a MockHttpClient, you don't actually use the values returned but instead your declare a constant and assign your data there.

The code currently reads:

private _getMockListData(): Promise<ISPLists> {
    return MockHttpClient.get(this.context.pageContext.web.absoluteUrl).then(() => {
        const listData: ISPLists = {
            value:
            [
                { Title: 'Mock List One', Id: '1' },
                { Title: 'Mock List Two', Id: '2' },
                { Title: 'Mock List Three', Id: '3' }
            ]
            };

        return listData;
    }) as Promise<ISPLists>;
}

Shouldn't it actually be something like:

  private _getMockListData(): Promise<ISPLists> {
    return MockHttpClient.get(this.context.pageContext.web.absoluteUrl)
            .then((data: ISPList[]) => {
                 var listData: ISPLists = { value: data };
                 return listData;
             }) as Promise<ISPLists>;
  }

Unable to upload workbench.aspx to an old created developer Site Collection

Hello

I have an old Developer Tenant. About 2 years old. I was trying to use the originally provisioned Developer Site Collection, but when I was trying to upload the workbench.aspx file, I got many issues. I got a lot of access denied errors. Even on SP Designer

What I did to make it work was, spin up a new fresh developer site collection. On the new one, I was able to upload the workbench.aspx file successfully

I was wondering, if may help put something on the documentation suggesting create a new developer site col.

2016-08-19_0-09-52

Tutorial 5: cannot find JQuery.module.scss

Hello!
Staring Tutorial 5, after building the project and opening in Visual Studio Code, JQuery.WebPart.ts line 8 says "import styles from './JQuery.module.scss';" when hovering over the red squiggles it says [ts] Cannot find module './JQuery.module.scss. Even though I see the JQuery.module.scss file sitting in the src->webparts->jQuery directory. Possible bug?

and just for being thorough..i ran gulp serve (i now there is an error) and this ๐Ÿ‘
"Error - tslint - src\webparts\jQuery\JQueryWebPart.ts(8,8): error no-unused-variable: unused variable: 'styles''

Module 4 Deploy to CDN, Webpart failed to render with no error

I followed all steps, confirmed JS and json assets (3 files) were uploaded to CDN correctly. The container path was resolved. It appears the deploy-azure-storage.json configuration entries are correct.
Uploading files '/.' from directory './temp/deploy/' to Azure
Upload complete!
But the web part is not rendering, only the web part title displayed. I don't have any explicit error. The JS did not load. The app package was properly uploaded after the CDN update.

I did receive a warning for Gulp package-solution. The specific file was created by the build task with no additional editing.
Warning - [package-solution] Ignoring manifest due to validation error (c:\coderepo\helloworld-webpart\dist\helloworld-webpart.stats.json)

I think the issue is with the write-manifests.json. I tried several forms. What is the correct string format for cdnBasePath? Can we show a sample in the tutorial?
"cdnBasePath": "https://xxxxx.blob.core.windows.net"

Gulp serve error es6-promise module not found on ubuntu

I'm trying to run gulp serve and i'm getting this error

i'm following the first tutorial https://github.com/SharePoint/sp-dev-docs/wiki/HelloWorld-WebPart

mauricionr@mauricionr:~/sharepoint$ sudo gulp serve
[22:35:55] Error - Unknown 
 Cannot find module 'es6-promise'
[22:35:56] ==================[ Finished ]==================
[22:35:56] Project sharepoint-first-component version: 0.0.1
[22:35:56] Build tools version: 0.7.1
[22:35:56] Node version: v4.4.7
[22:35:56] Total duration: 3.01 s
[22:35:56] Task errors: 5

Thanks!

tslint to strict for React components

If you want to add one of the lifecycle methods to the React component you get the following TSLint error during the build: error no-unused-variable: unused variable: 'componentWillMount'.

I solved it by adding /* tslint:disable:no-unused-variable */ to the component.

/* tslint:disable:no-unused-variable */
import * as React from 'react';
/* tslint:disable:no-unused-variable */

Error: Cannot find module 'gulp-webserver'

From stack exchange (http://sharepoint.stackexchange.com/questions/183925/error-cannot-find-module-gulp-webserver)

Issue - While spinning up the SharePoint framework, getting the mentioned error instead of running the gulp task which I got scaffold from the Yeoman.

Answer - Issue was with the existance of the web server. Solution: Go to gulp location within your solution and use below..Solved!

$ npm install --save-dev gulp-webserver
This would be usefull - https://www.npmjs.com/package/gulp-webserver

@SPDoctor - To help debug - any chance you could give some information on your environment, steps, etc?

SharePoint Online won't run workbench.aspx

Followed the instructions to upload Workbench.aspx to a document library. I've added the ClientSideApplicationId column as well. I get this error:

Sorry, something went wrong
The requested operation is part of an experimental feature that is not supported in the current environment.
TECHNICAL DETAILS

Troubleshoot issues with Microsoft SharePoint Foundation.
Correlation ID: 06df9a9d-5054-2000-1604-1dcab5d4e85c

Date and Time: 8/17/2016 8:48:19 PM

Do I need to op into something? I'm already on bleeding o365 releases. Or perhaps roll-out will take a while?

Tutorial 3: Error in App Package (SPFX)

I am getting an error in tutorial 3 of the SPFX. When adding the hello-world-webpart to the app catalog. Says "There were errors when validating the App Package. The package manifest doesn't contain a StartPage element in Properties." I have followed every instruction.

I am in my Developer tenant with first release enabled
Thank you

Unable to remove a Web Part with error from page

If a Web Part throws an error during rendering you cannot remove it from page. Clicking the Yes button in the Delete Confirmation dialog throws the following error:

CanvasStore.ts:305 Uncaught TypeError: Cannot read property 'controlType' of undefined
CanvasStore.handleDeleteDialogConfirmation  @   CanvasStore.ts:305

gulp error : Error: Cannot find module '@microsoft/sp-build-web'

E:\myfolder>gulp serve
module.js:327
throw err;
^

Error: Cannot find module '@microsoft/sp-build-web'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (E:\shlok\helloworld-webpart\gulpfile.js:4:15)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)

Various issues with yo @microsoft/sharepoint

A number of issues appear when running the yo @microsoft/sharepoint command.

npm WARN deprecated [email protected]: not actively maintained anymore
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
[ ............] | fetchMetadata: sill mapToRegistry uri https://registry.npmjs.org/tslint-microsoft-contrib[ ............] | fetchMetadata: sill mapToRegistryTerminate batch job (Y/N)? yMetadata: sill mapToRegistry uri https://registry.npmjs.org/tslint-microsoft-contrib

Toolbox shows only the first Web Part specified in preconfiguredEntries

If you specify multiple preconfiguredEntries, only the first Web Part is displayed in the toolbox:

{
  "$schema": "../../../node_modules/@microsoft/sp-module-interfaces/lib/manifestSchemas/jsonSchemas/clientSideComponentManifestSchema.json",

  "id": "cbf1c4ba-8b6c-4b45-9900-ef12815275c3",
  "componentType": "WebPart",
  "version": "0.0.1",
  "manifestVersion": 2,

  "preconfiguredEntries": [{
    "groupId": "cbf1c4ba-8b6c-4b45-9900-ef12815275c3",
    "group": { "default": "Under Development" },
    "title": { "default": "HelloWorld" },
    "description": { "default": "HelloWorld description" },
    "officeFabricIconFontName": "Page",
    "properties": {
      "description": "HelloWorld"
    }
  },
  {
    "groupId": "cbf1c4ba-8b6c-4b45-9900-ef12815275c3",
    "group": { "default": "Under Development" },
    "title": { "default": "HelloWorld 123" },
    "description": { "default": "HelloWorld description" },
    "officeFabricIconFontName": "Page",
    "properties": {
      "description": "HelloWorld"
    }
  }]
}

screen shot 2016-08-18 at 11 23 44

Property pane scrollbar is missing

If I have a lot of properties and groups with in a property pane page, and they do not have show as accordion configured, then the last property field is only half visible.

image

Currently Windows exclusive but no support for Mac, Linux and Bash On Windows

Currently the new SharePoint Framework is Windows exclusive. The problem is caused when a file system is case-sensitive and not case-aware like Windows.

Got the following error message:
screen shot 2016-08-17 at 22 29 26

Currently it cannot reproduced on Bash for Windows because there is yet an unresolved issue with Yeoman generators.
To fix this issue you need to take care of correct written file names in all references.
Checked it on a partition that is case-insensitive and Yeoman generator is working perfectly.

Angular 2 : Documentation

So far I haven't seen any mention of Angular 2 in relationship to the SP Framework. ng2 is almost public release, so it's good to provide some guidance. I'll do my best to publish a blog post about this in the next week or so.

Path too long

Creating project with Yeoman is making too deep structure of files which fires red errors during installation. The structure is so deep, I can't open it with Visual Studio (it freezes trying to load it all). Hack, I can't even delete the created folder (windows alerts something like Path too long, move it so you can delete it).

error

Workbench not working on First Release tenant

Hi,
I have First Release tenant subscription. When I setup my existing DEV site collection as specified in documentation and try to open workbench, I receive error "The requested operation is part of an experimental feature that is not supported in the current environment. "

It is not noted in the setup docs that specific version of SharePoint tenant is required. Please clarify in documentation.

.stats.json incorrectly picked up as a manifest by the package-solution gulp task

The package-solution gulp task incorrectly detects the .stats.json file as a Web Part manifest. This results in the following error being thrown while running the task:

Warning - [package-solution] Ignoring manifest due to validation error (/Users/clippy/tmp/dist/tmp.stats.json)

Adding the --verbose flag gives more details about the error:

[16:04:14] Warning - [package-solution] Ignoring manifest due to validation error (/Users/clippy/tmp/dist/tmp.stats.json)
[16:04:14] [package-solution] (#/) Data does not match any schemas from 'oneOf'
(#/) Missing required property: description
(#/) Missing required property: manifestVersion
(#/) Missing required property: preconfiguredEntries

Consider making HttpClient features opt-in

The HttpClient (@microsoft/sp-client-base) always add a "odata-version":"4.0" header to all requests. This makes requests to for instance the SharePoint Search API endpoint to fail (HTTP 500).

Please remove this automatic addition of the header.

Integration of custom gulp tasks - formally build tasks

I did a quick check on the gulp tasks. From my point of view it is pretty much locked down and supports only some few options.

Let's say I have I like to use precompiled Handlebars during development I'm unable to extend the functionalities, because I don't have direct access to the gulp file.

My guess right now is that extensions like these are currently not supported. In future it will be great to have somehow an interface to inject custom build tasks in the overall build process.

Currently the only way is to use additional libraries via CDN.

Architecture document

Please let me know any architecture or how the request is processed on Sharepoint document available

Why ReactJS or Knockout but not React + Knock?

I haven't digged deeper into this but what right now confuses me is why I can choose between React and Knockout. What if I like to use react and knockout together or does kockout include react?
I think it might be a little bit confusing in the generator.

screen shot 2016-08-21 at 23 54 06

workbench.aspx

I'm currently running through the HelloWorld tutorial, and am currently at stage 6:

Step 6: Preview web part in SharePoint

SharePoint Workbench is also hosted in SharePoint to preview and test your local web parts in development. The key advantage is that now you are running in SharePoint context and that you will be able to interact with SharePoint data.

Navigate to the following URL: https://your-sharepoint-site/Shared%20Documents/workbench.aspx

I can't seem to access this file at all, due to this being so new is it a case that this isn't available on all data centres yet? I ran up a new Dev tenancy about 2 hours ago in order to start playing with the new framework, but may start to struggle if I can't actually preview against SharePoint data.

TypeError: Cannot read property 'entries' of undefined

when trying to run this command
yo @microsoft/sharepoint
getting this below error...
events.js:141
throw er; // Unhandled 'error' event
^

TypeError: Cannot read property 'entries' of undefined
at module.exports.yeoman.Base.extend.prompting._updateConfig (/usr/local/lib/node_modules/@microsoft/generator-sharepoint/generators/webpart/main.js:90:11)
at module.exports.yeoman.Base.extend.prompting.writing (/usr/local/lib/node_modules/@microsoft/generator-sharepoint/generators/webpart/main.js:70:10)
at Object. (/usr/local/lib/node_modules/@microsoft/generator-sharepoint/node_modules/yeoman-generator/lib/base.js:431:23)
at /usr/local/lib/node_modules/@microsoft/generator-sharepoint/node_modules/run-async/index.js:26:25
at /usr/local/lib/node_modules/@microsoft/generator-sharepoint/node_modules/run-async/index.js:25:19
at /usr/local/lib/node_modules/@microsoft/generator-sharepoint/node_modules/yeoman-generator/lib/base.js:432:9
at processImmediate as _immediateCallback

Unable to update version

Version of package is not getting updated. On re-installing new package after removing older one below issue is observed in SharePoint

A different version of this App is already installed with the same version number. You need to delete the app from the site and the site recycle bin to install this version.

Disabling property pane controls issues

Currently there is huge inconsistencies in how the different controls in the property pane works. For instance if you want to disable different properties this is my findings.

  1. disabled can be used on for instance PropertyPaneToggle and it is reactive, i.e. it can be connected to other property values.
  2. PropertyPaneDropdown has an isDisabled property and it is not reactive, and you have to reload the page to toggle the disabled state
  3. PropertyPaneTextField does not have any disabled possibilities at all to set it to disabled

I'd like to see disabled used throughout all property pane controls and the property should be reactive.

Create additional web part in same project and bundle

Currently you can only have one web part per project becaue all the required files are provisioned during the project creation.
In addition it would be nice if you will be able to add an additional web part the easy way similar to VS.

Let's say you have a gulp task like this.

gulp add-webpart
Web part name: HelloWorld2
Web part description: Additional Hello World Web Part

After that the gulp task can stream and copy the files, rename them and add it to the source folder. Should be a pretty easy but convenient addition.

I know It's just a developer preview but I thing it would be pretty useful.

OSX sp-build-web module permissions issue

I'm using OSX with "El Capitan" I have latest LTS version of Node JS 4.5.0 and NPM 2.15.9.

I did the setup for Yeoman, Gulp and Yeoman generator for SharePoint.

When I tried to generate HelloWorld Webpart example I got the following error (I even tried run gulp serve without success):

btw, I did that with and without ROOT privileges

[email protected] postinstall /Users/juan/Desktop/SharePoint/helloworld-webpart/node_modules/@microsoft/sp-build-web/node_modules/gulp-core-build-sass/node_modules/gulp-sass/node_modules/node-sass
node scripts/build.js

"/Users/juan/Desktop/SharePoint/helloworld-webpart/node_modules/@microsoft/sp-build-web/node_modules/gulp-core-build-sass/node_modules/gulp-sass/node_modules/node-sass/vendor/darwin-x64-46/binding.node" exists.
testing binary.
Binary is fine; exiting.
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v4.5.0
npm ERR! npm v2.15.9
npm ERR! path /Users/juan/.npm/object-assign/4.0.1
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir

npm ERR! Error: EACCES: permission denied, mkdir '/Users/juan/.npm/object-assign/4.0.1'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, mkdir '/Users/juan/.npm/object-assign/4.0.1']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/Users/juan/.npm/object-assign/4.0.1',
npm ERR! parent: 'gulp-core-build-typescript' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/juan/Desktop/SharePoint/helloworld-webpart/npm-debug.log

  _=+#####!       

###########| .-------------------------------------------.
###/ (##|(@) | Congratulations! |

######| \ | Solution helloworld-webpart is created. |

###/ /###| (@) | Run gulp serve to play with it! |
####### ##| / '-------------------------------------------'

/##|(@)

###########|
**=+####!

juans-MacBook-Pro:helloworld-webpart juan$ pwd
/Users/juan/Desktop/SharePoint/helloworld-webpart
juans-MacBook-Pro:helloworld-webpart juan$ pwd
/Users/juan/Desktop/SharePoint/helloworld-webpart
juans-MacBook-Pro:helloworld-webpart juan$ ls -l
total 2496
-rw-r--r-- 1 juan staff 613 Aug 21 12:31 README.md
drwxr-xr-x 10 juan staff 340 Aug 21 12:31 config
-rw-r--r-- 1 juan staff 126 Aug 21 12:31 gulpfile.js
-rw-r--r-- 1 juan staff 4412 Aug 21 12:31 helloworld-webpart.njsproj
drwxr-xr-x 5 juan staff 170 Aug 21 12:32 node_modules
-rw-r--r-- 1 juan staff 1250951 Aug 21 12:35 npm-debug.log
-rw-r--r-- 1 juan staff 545 Aug 21 12:31 package.json
drwxr-xr-x 4 juan staff 136 Aug 21 12:31 src
-rw-r--r-- 1 juan staff 154 Aug 21 12:31 tsconfig.json
drwxr-xr-x 15 juan staff 510 Aug 21 12:31 typings
juans-MacBook-Pro:helloworld-webpart juan$ gulp serve
module.js:327
throw err;
^

Error: Cannot find module '@microsoft/sp-build-web'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (/Users/juan/Desktop/SharePoint/helloworld-webpart/gulpfile.js:4:15)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
juans-MacBook-Pro:helloworld-webpart juan$

gulp serve error

Hi,

When I build the solution throwing below error

Cannot find module 'orchestrator'

Subsequent variable declarations must have the same type. Variable 'require' must be of type '{ (path: string): any; (paths: string[], callback: (...modules: any[]) => void): void; resolve: (...', but here has type 'NodeRequire'.

Default value showing undefined

I have followed steps to add new propertied to helloworld webpart. But default value not updating showing as undefined
image

Also receiving below error
image

Clarify documentation on "Upload SharePoint Workbench" (Page: Setup SharePoint Tenant)

It took me some time to get workbench.aspx up and running on my Dev-Tenant. The current documentation chapter "Upload SharePoint Workbench" (Page: Setup SharePoint Tenant) could be more clear in how to handle the file.

I suggest changing the above mentioned paragraph to read as follows:

"While we will introduce and talk about the SharePoint Workbench in the tutorials, to get set up, download the workbench.aspx to your local machine. Open the file from our GitHub repo in your browser, switch the view to RAW format, then right click, choose Save As option to save as workbench.aspx to your local computer, and upload it to the Documents library in the dev site collection."

Documentation error under "Get Started/Setup your Office 365 Developer Tenant/Setup document library/Create the new column"

The section titled "Create the new column" currently reads:

Follow the steps below to add the new field to the Documents library:

Click the gears icon on the top right and the click on Site settings to open the settings page.
Click on Site libraries and lists under the Site Administration category.
Click on Customize Documents
Now, click on Create column under Columns:
    Type ClientSideApplicationId as the column name and leave other fields as they are.
    Click OK button to create the column.

I believe it should read:

Click the gears icon on the top right and click on Site Contents.
Click the three dot icon next to the Document library you have created/chosen.
Choose Settings.
Now, click on Create column under Columns:
Type ClientSideApplicationId as the column name and leave other fields as they are.
Click OK button to create the column.

SPSite:id is not a Guid type

The id property of SPSite is of the format string instead of Guid, which is what the SPWeb class is using for the id property.

Gulp Serve Error: Error parsing file 'config.json', section [undefined]

Windows Server 2012 R2. Patched today.
Running the command "gulp serve" produces the following error and output:

Build target: DEBUG
Error: Error parsing file 'config.json', section [undefined]:
(undefined) JSON_OBJECT_VALIDATION_FAILED

[21:23:42] Error - Unknown
Error: Error parsing file 'config.json', section [undefined]:
(undefined) JSON_OBJECT_VALIDATION_FAILED

[21:23:42] =========[ Finished ]===========
[21:23:43] Project helloworld-webpart version: 0.0.1
[21:23:43] Build tools version: 0.7.1
[21:23:43] Node version: v4.5.0
[21:23:43] Total duration: 2.1 min
[21:23:43] Task errors: 5

Naming of IPropertyPaneFieldType

Is IPropertyPaneFieldType really the correct naming for that enumeration? Normally I is used to show that it is an intererface. I recommend renaming it to PropertyPaneFieldType.

Documentation Issue and Python 2.7

There is an issue https://github.com/SharePoint/sp-dev-docs/wiki/Setup-your-machine.
The installation of Python is only required on Windows but not on other systems.

In addition you need to install a C++ compiler or VC++ runtime on Windows. SPFX use node-gyp an doesn't work on Windows without those compilers.
When you have Visual Studio installed you don't have a problem because it installs a C++ compiler/runtime.

Node-gyp has a detailed documentation of prerequesits for Windows, Mac and Linux. see node-gyp

Non-AMD dependencies seem not to be working correctly

I'm trying to use a non-AMD jQuery plugin loaded from CDN and once in a while I'm seeing an error, which seems like the plugin is being loaded before jQuery.

I have the following setup:

config.json (standard external omitted for brevity):

  "externals": {
    "jquery": {
      "path": "https://code.jquery.com/jquery-2.1.1.min.js",
      "globalName": "jQuery"
    },
    "simpleWeather": {
      "path": "https://cdnjs.cloudflare.com/ajax/libs/jquery.simpleWeather/3.1.0/jquery.simpleWeather.min.js",
      "globalName": "jQuery",
      "globalDependencies": ["jquery"]
    }
  }

WebPart:

import * as $ from 'jquery';
require('simpleWeather');

Both scripts load correctly (200 OK status), but once in a while I'm seeing the following error:

Error: Unable to load web part script resources due to: Error: ReferenceError: jQuery is not defined at eval (https://cdnjs.cloudflare.com/ajax/libs/jquery.simpleWeather/3.1.0/jquery.simpleWeather.min.js:2:3490) Evaluating https://cdnjs.cloudflare.com/ajax/libs/jquery.simpleWeather/3.1.0/jquery.simpleWeather.min.js Error loading https://spoppe-a.akamaihd.net/files/simpleWeather. at http://lt-wama.local:4321/node_modules/@microsoft/sp-client-preview/dist/sp-client-preview.js:19233:32

The network graph shows both scripts are loaded simultaneously despite the dependencies. Using the ModuleLoader similar setup works as expected.

Tutorial 2: step 7 includes reference to a property called "Test2", will result in a failed built

Tutorial 2, step 7 code for render()

<p class="ms-font-l ms-fontColor-white">Customize SharePoint experiences using Web Parts.</p>
<p class="ms-font-l ms-fontColor-white">${this.properties.description}</p>
<p class="ms-font-l ms-fontColor-white">${this.properties.test2}</p>
<p class='ms-font-l ms-fontColor-white'>Loading from ${this.context.pageContext.web.title}</p>

${this.properties.test2} is going to throw build errors:

Property 'test2' does not exist on type 'SPWeb'

Should this be removed from the example? Happy to submit a PR if the above makes sense.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.