3

I am facing critical issue in setting up development environment for SPFx.

I have refereed following link Link: https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-development-environment

1) I have installed latest LTS version of Node(v8.10.0) package on E: drive (other than system drive and I have no installation access).

2) I have tried installing the Yeoman and gulp on the same path (other than system drive) and it's installed successfully.

3) when I try to create webpart on same path it gives following error:

enter image description here

Logs:

3199 verbose stack SyntaxError: Unexpected end of JSON input while parsing near '...dencies":{"@types/ass'
3199 verbose stack     at JSON.parse (<anonymous>)
3199 verbose stack     at parseJson (E:\Development\node_modules\npm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\node-fetch-npm\node_modules\json-parse-better-errors\index.js:7:17)
3199 verbose stack     at consumeBody.call.then.buffer (E:\Development\node_modules\npm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\node-fetch-npm\src\body.js:96:50)
3199 verbose stack     at <anonymous>
3199 verbose stack     at process._tickCallback (internal/process/next_tick.js:188:7)
3200 verbose cwd E:\Projects\Development\SPFx\helloworld-webpart
3201 verbose Windows_NT 10.0.15063
3202 verbose argv "E:\\Development\\node.exe" "E:\\Development\\node_modules\\npm\\bin\\npm-cli.js" "install" "--cache-min" "86400"
3203 verbose node v8.10.0
3204 verbose npm  v5.6.0
3205 error Unexpected end of JSON input while parsing near '...dencies":{"@types/ass'
3206 verbose exit [ 1, true ]

Thanks in Advance

11
  • can check what the error says in the log file ? Commented Jul 20, 2018 at 6:08
  • @GautamSheth, I have updated code adding log text Commented Jul 20, 2018 at 6:15
  • can you try npm cache clean --force and then npm set registry https://registry.npmjs.org/ in your command line and create a new project to try again ? Commented Jul 20, 2018 at 6:23
  • @GautamSheth, process stuck : "[ .................] / fetchMetadata: sill fetchPackageMetaData error for [email protected] Unexpected end of JSON input while parsing near '...~0.8.1"},"devDependen'" Commented Jul 20, 2018 at 6:35
  • looks like some issue with NPM, try to start your generator using yo @microsoft/sharepoint --package-manager yarn or yo @microsoft/sharepoint --package-manager pnpm and check with a new project Commented Jul 20, 2018 at 6:41

1 Answer 1

4

Turns out this issue seems to be related to Firewall or some other security restriction which was preventing download of files nothing to do with MS.

Once the connection was changed and the machine connected to the open internet, were able to create the hello world webpart correctly.

Would suggest that you download the files required for the project via NPM to be done via an open connection or create some firewall rule which will allow such files to be downloaded.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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