Module '"../../../node_modules/@pnp/sp"' has no exported member 'ListEnsureResult'.ts(2305)

%3CLINGO-SUB%20id%3D%22lingo-sub-1491277%22%20slang%3D%22en-US%22%3EModule%20'%22..%2F..%2F..%2Fnode_modules%2F%40pnp%2Fsp%22'%20has%20no%20exported%20member%20'ListEnsureResult'.ts(2305)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1491277%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20there%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20try%20to%20test%20SPFx%20and%20met%20numerous%20difficult%2C%20like%20the%20shown%20below%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Edoes%20anyone%20have%20any%20idea.%20(the%20spfx%20werbpart%20will%20support%20on%20premise%20and%20online)%3F%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Untitled.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F201263i6E5A51A488A12421%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Untitled.png%22%20alt%3D%22Untitled.png%22%20%2F%3E%3C%2FSPAN%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Frequent Contributor

Hi there,

 

I try to test SPFx and met numerous difficult, like the shown below: 

 

does anyone have any idea. (the spfx werbpart will support on premise and online)?? 

 

Untitled.png 

2 Replies

Hi @Will # _________ H,

 

I assume you are using the version 2.x of PnPJS. They made some modifications to how imports work, as you can see here. You can change your import code to work that way or, as I'd suggest, just switch to the old version of PnPJS where import can be done in a easier manner. If you're a beginner, switching versions could make things more simple for you.

To change to version 1.3.3, the one I use, go to your package.json file, find all the "@pnp" modules in the dependencies section, and replace the version. Let me know if you need any help.

@Carlos_Marins Thanks for your help. It seems that the environment issue. I reset my spfx environment by following docs.microsoft.com. currently it works properly.