Can't resolve ControlStrings
See original GitHub issueHi There,
I’ve been using spfx-controls-react just fine. However, now when attempting to add a ListView component I get the following error.
ERROR in ./node_modules/@pnp/spfx-controls-react/lib/controls/listView/ListView.js Module not found: Error: Can’t resolve ‘ControlStrings’ in ‘C:\Users\Studio\Developer\SharePoint\SPForm\node_modules@pnp\spfx-controls-react\lib\controls\listView’ @ ./node_modules/@pnp/spfx-controls-react/lib/controls/listView/ListView.js 18:14-39 @ ./node_modules/@pnp/spfx-controls-react/lib/controls/listView/index.js @ ./node_modules/@pnp/spfx-controls-react/lib/ListView.js @ ./src/scripts/components/list/List.tsx @ ./src/scripts/components/form/TabTwo.tsx @ ./src/scripts/components/layout/Form.tsx @ ./src/scripts/root.tsx @ ./src/scripts/index.ts @ multi ./node_modules/sp-build-tasks/dist/webpack/polyfills.js ./src/scripts/index.ts
ERROR in ./node_modules/@microsoft/sp-core-library/lib/SPCoreLibraryStrings.resx.js
Module not found: Error: Can't resolve 'resx-strings' in 'C:\Users\Studio\Developer\SharePoint\SPForm\node_modules\@microsoft\sp-core-library\lib'
@ ./node_modules/@microsoft/sp-core-library/lib/SPCoreLibraryStrings.resx.js 4:4-27
@ ./node_modules/@microsoft/sp-core-library/lib/SPError.js
@ ./node_modules/@microsoft/sp-core-library/lib/index.js
@ ./node_modules/@pnp/spfx-controls-react/lib/common/telemetry/index.js
@ ./node_modules/@pnp/spfx-controls-react/lib/controls/listView/ListView.js
@ ./node_modules/@pnp/spfx-controls-react/lib/controls/listView/index.js
@ ./node_modules/@pnp/spfx-controls-react/lib/ListView.js
@ ./src/scripts/components/list/List.tsx
@ ./src/scripts/components/form/TabTwo.tsx
@ ./src/scripts/components/layout/Form.tsx
@ ./src/scripts/root.tsx
@ ./src/scripts/index.ts
@ multi ./node_modules/sp-build-tasks/dist/webpack/polyfills.js `./src/scripts/index.ts
app.json
{ "$schema": "../node_modules/sp-build-tasks/schema/v1/sppp.json", "spFolder": "_catalogs/masterpage/sppp-listform", "distFolder": "./dist", "localizedResources": { "ControlStrings": "../node_modules/@pnp/spfx-controls-react/lib/loc/{locale}.js" } }
tsconfig.json
{ "compilerOptions": { "target": "es5", "module": "esnext", "lib": ["es2017", "dom"], "rootDir": "src", "jsx": "react", "sourceMap": true, "declaration": true, "moduleResolution": "node", "noImplicitAny": false, "removeComments": true, "experimentalDecorators": true, "skipLibCheck": true, "types": ["node", "sharepoint"], "outDir": "tmp" }, "exclude": [ "node_modules", "webpack.config.js", "gulpfile.js", "build", "dist", "tmp", "cache" ] }
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7
Top GitHub Comments
This is an old issue, but I got the same error when adding a PeoplePicker to my SPFx webpart. That was solved by just stopping the local server and re run “gulp serve”…
sp-dev-fx-controls-react is developed to be used in SharePoint Framework solutions. generator-spreactformfields creates projects that are not SPFx solutions. So, I don’t think you can use it without some additional tricks.