Sp-dev-fx-webparts: npm install error on react-display-hierarchy

Created on 26 Nov 2020  路  7Comments  路  Source: pnp/sp-dev-fx-webparts

Sample (which sample are you having trouble with)

react-display-hierarchy

Authors

Nanddeep Nachan聽(SharePoint Consultant,聽@nanddeepnachan @nanddeepn 聽)
Ravi Kulkarni聽(SharePoint Consultant)

Expected or Desired Behavior

npm install installs the dependencies.

Observed Behavior

I am getting the following error:
Not Found - GET https://registry.npmjs.org/event-stream/-/event-stream-3.3.6.tgz
npm ERR! 404
npm ERR! 404 '[email protected]' is not in the npm registry.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Open the sample in VS Code
  2. Run npm install
  3. See error

Environment Details (Development & Target environment)

  • OS: Windows 10
  • Target Environment: N/A
  • Framework: N/A
  • Browser(s): N/A
  • Tooling: VS Code, Node.js v10
  • Additional details: googling tells me there are vulnerabilities associated with '[email protected]'

Additional context

Side note, I am surprised to see a shrinkwrap file in the sample, I never saw that in other samples.

answered bug

All 7 comments

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

Thanks for reporting. I will look into this error.

Hi @PathToSharePoint
I tried npm install and it seems to be working fine with Node v10.19.0
I see a note from you about shrinkwrap file. Looks like you are using old version of this web part.
Can you please try the newer version of this web part upgraded with SPFx v1.11.0

My mistake! I ran a git pull but didn't notice it failed. After a complete re-cloning, npm install works just fine.

Could you explain why the shrinkwrap file was in a previous version and not the latest one? It's actually something I was wondering about: should I run npm shrinkwrap when creating a sample?

[Edit] I tested the Web Part and it didn't work for me in the workbench. My site doesn't have a Hierarchy list but has a list called OrgChart. When I change the list name in the property pane the Web Part doesn't get updated. The error message is partially displayed as follows:
image

Hi @PathToSharePoint
The web part react-display-hierarchy was developed couple of years back with SPFx v1.6.0 and we used npm shrinkwrap to lock down the npm package dependencies, but now that it is handled through package-lock.json

Please see if your custom OrgChat list is following the same schema as defined here for the Hierarchy list.

I see, thanks for the explanation. Note that package-lock.json is not a full replacement for shrinkwrap, so both still have their place.

As for the list, I added the URL column that was missing, but that didn't make a difference. The issue is actually that the query doesn't even pick the new name in the property pane. Here is the full error message:
Please verify webpart configuration. Error details: Error making HttpClient request in queryable [404] Not Found ::> {"odata.error":{"code":"-1, System.ArgumentException","message":{"lang":"en-US","value":"List 'Hierarchy' does not exist at site with URL 'https://pathto.sharepoint.com/sites/TransferRequest'."}}}

[Update] I did some more testing. If I change the list name and then reload the page, the Web Part works. The issue I am seeing is that the Web Part doesn't respond directly to property pane changes. Maybe a flag that doesn't get reset?

For the record, I am working on my own org chart Web Part, that's why I was interested to see your work :-)
https://twitter.com/Path2SharePoint/status/1321212700827873281

Hey @PathToSharePoint I've closed this issue because this issue was related to an old version of the web part.

If you'd like to continue having a discussion regarding the other issues you mention in this list, feel free to open a separate issue so we can track it accordingly.

Also, please continue using GitHub to discuss issues instead of a broadcast message on Twitter. We're trying to keep all information related to issues in one place. Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ChristianSaldivar picture ChristianSaldivar  路  3Comments

floriemoulin picture floriemoulin  路  4Comments

spo-theworst picture spo-theworst  路  5Comments

PathToSharePoint picture PathToSharePoint  路  4Comments

fleagleman picture fleagleman  路  3Comments