1

I was following https://dev.office.com/sharepoint/docs/spfx/set-up-your-development-environment on Windows 10 machine. I opened command prompt window in Admin mode. installing NodeJS, npm and then npm install -g yo gulp and npm install -g @microsoft/generator-sharepoint completed successfully.

On the next page, https://dev.office.com/sharepoint/docs/spfx/web-parts/get-started/build-a-hello-world-web-part I created new folders (

md helloworld-webpart
, then
cd helloworld-webpart
) and started

yo @microsoft/sharepoint

After running for minutes, I've got

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@* (node_modules\@microsoft\gulp-core-build-webpack\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! path E:\Demos\helloworld-webpart\node_modules\.staging\@types\lodash-16ec5ab8
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename
npm ERR! Error: EPERM: operation not permitted, rename 'E:\Demos\helloworld-webpart\node_modules\.staging\@types\lodash-16ec5ab8' -> 'E:\Demos\helloworld-webpart\node_modules\@types\lodash'
npm ERR!  { Error: EPERM: operation not permitted, rename 'E:\Demos\helloworld-webpart\node_modules\.staging\@types\lodash-16ec5ab8' -> 'E:\Demos\helloworld-webpart\node_modules\@types\lodash'
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'rename',
npm ERR!   path: 'E:\\Demos\\helloworld-webpart\\node_modules\\.staging\\@types\\lodash-16ec5ab8',
npm ERR!   dest: 'E:\\Demos\\helloworld-webpart\\node_modules\\@types\\lodash',
npm ERR!   parent: 'helloworld-webpart' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     E:\Users\Oleg\AppData\Roaming\npm-cache\_logs\2017-03-31T18_31_21_102Z-debug.log
 

I tried a couple of times and got the same result.

npm -v 3.10.10 Node -v v7.5.0

I found similar questions: Gulp serve error : Cannot find module '@microsoft/sp-build-web' and Yeoman generator for WebPart can't find Github repo #spfx #spfx-webparts #spfx-tooling but none of the suggestions helped.

1

What helped me I found here: http://ericoverfield.com/update-sharepoint-framework-yeoman-generator/ In particular, the line:

npm update -g @microsoft/generator-sharepoint@latest

After the update, I see

npm list -g @microsoft/generator-sharepoint `-- @microsoft/generator-sharepoint@1.0.2

The issue has gone. Now, I'm able to work.

0

I've heard of some people having some trouble with the Node v7... have you tried it on an LTS version like v6?

Also, are you running this from an administrative command prompt? I see that in the error above... worth investigating...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.