Sp-dev-fx-webparts: Missing files on npm install

Created on 7 Jan 2020  路  6Comments  路  Source: pnp/sp-dev-fx-webparts

After downloading (both by using the ZIP and Git), I am instructed to execute npm install. However, this results in an enormous amount of warmings due to missing files and the end result are errors.
gulp serve als gives errors.

So I'm stuck on getting the files before starting.
How can I get all the files and all dependencies and/or make sure that the code I download is complete and working?

sample-code answered question

Most helpful comment

Hey Chris,

You can get rid of those warnings by removing the package-lock.json file (run rm package-lock.json when you're inside the sample folder), then run npm install as per normal.

All 6 comments

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@Momus2302 , I'm pretty new at this myself. One of the first things to check that may not be mentioned on the sample Readme is that you should go first go to the folder for the sample.

So like I am currently re-using the react-facebook-plugin example.

I have to go to this folder and then run the npm install and gulp serve from it:
C:\FolderWhereThisRepoIsIn \sp-dev-fx-webparts\samples\react-facebook-plugin\

Basically one folder up from the src folder of the sample you are trying to use.

If you want to reply back with the example you are trying to use and the folder you are currently in, it would help :)

Running npm install from sp-dev-fx-webparts\samples\react-script-editor also gives the same list of "no such file or directory" errors.

First, I get these to warnings, followed by hundreds more:
npm WARN tarball tarball data for @microsoft/[email protected] (sha1-iImCPTaoQl6Dxjxki9BWOfq/Wwg=) seems to be corrupted. Trying one more time.
npm WARN tarball tarball data for @microsoft/[email protected] (sha1-iImCPTaoQl6Dxjxki9BWOfq/Wwg=) seems to be corrupted. Trying one more time.

Hey Chris,

You can get rid of those warnings by removing the package-lock.json file (run rm package-lock.json when you're inside the sample folder), then run npm install as per normal.

@ChrisMenning did @Rondellio 's answer help you solve this issue?

I'll go ahead and mark this as closed, but if you still need help with this, feel free to re-open the issue.

Was this page helpful?
0 / 5 - 0 ratings