sp-dev-fx-webparts: Cannot find module "contentQueryStrings" when adding react-content-query-webpart to page
Category
- Question
- Bug
- Enhancement
Expected or Desired Behavior
When I run this example. I run into a problem where i have to change import { IWebPartContext } from '@microsoft/sp-webpart-base';
to import { WebPartContext } from '@microsoft/sp-webpart-base';
Now there is no errors in the code and when i run gulp serve
it loads and open the workbench.
Observed Behavior
When I add the webpart to the page I get this error message
[SPLoaderError.loadComponentError]: ***Failed to load component “3bbca76a-5369-4a92-af23-d4bfd1c4e3b4” (ContentQueryWebPart). Original error: ***Failed to load entry point from component “3bbca76a-5369-4a92-af23-d4bfd1c4e3b4” (ContentQueryWebPart). Original error: Error loading https://component-id.invalid/3bbca76a-5369-4a92-af23-d4bfd1c4e3b4_0.0.1 Cannot find module “contentQueryStrings”
***INNERERROR: ***Failed to load entry point from component “3bbca76a-5369-4a92-af23-d4bfd1c4e3b4” (ContentQueryWebPart). Original error: Error loading https://component-id.invalid/3bbca76a-5369-4a92-af23-d4bfd1c4e3b4_0.0.1 Cannot find module “contentQueryStrings” ***CALLSTACK: Error at SPLoaderError.SPError [as constructor] (https://localhost:4321/node_modules/@microsoft/sp-loader/dist/sp-loader-assembly_en-us.js:10183:24) at new SPLoaderError (https://localhost:4321/node_modules/@microsoft/sp-loader/dist/sp-loader-assembly_en-us.js:4211:28) at Function.ErrorBuilder.buildErrorWithVerboseLog (https://localhost:4321/node_modules/@microsoft/sp-loader/dist/sp-loader-assembly_en-us.js:3821:21) at Function.ErrorBuilder.buildLoadComponentError (https://localhost:4321/node_modules/@microsoft/sp-loader/dist/sp-loader-assembly_en-us.js:3743:21) at https://localhost:4321/node_modules/@microsoft/sp-loader/dist/sp-loader-assembly_en-us.js:7952:38
Im not sure what the problem is but now after 2 days of trying to fix this im lost, This is the first time I’m posting an issue here, so sorry if I did it wrong.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 16 (8 by maintainers)
Ok well you don’t need to, I did include a version of the project converted to 1.4.1, it is in a zip file at the root of the project called content-query-webpart-1.4.1.zip.
Simply unzip that file in another location and try installing/gulping that version of the project instead 👍