Forum Discussion
Will # _________ H
Jun 26, 2020Brass Contributor
Module '"../../../node_modules/@pnp/sp"' has no exported member 'ListEnsureResult'.ts(2305)
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)??
Carlos_Marins
Jun 29, 2020Iron Contributor
I assume you are using the version 2.x of PnPJS. They made some modifications to how imports work, as you can see https://pnp.github.io/pnpjs/transition-guide. 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.
- Will # _________ HJul 05, 2020Brass Contributor
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.