sp-dev-fx-property-controls icon indicating copy to clipboard operation
sp-dev-fx-property-controls copied to clipboard

'export not found' errors with SPFX 1.15.2

Open attCurtisHennessy opened this issue 1 year ago • 2 comments

Thank you for reporting an issue, suggesting an enhancement, or asking a question. We appreciate your feedback - to help the team understand your needs please complete the below template to ensure we have the details to help. Thanks!

Please check out the documentation to see if your question is already addressed there. This will help us ensure our documentation is up to date.

Category

  • [ ] Enhancement
  • [X] Bug
  • [ ] Question

Version

Please specify what version of the library you are using: [ 3.8.0 ]

Expected / Desired Behavior / Question

To build without error!

Observed Behavior

Upon upgrading to SPFX 1.15.2, and also upgrading @pnp/spfx-property-controls to 3.8.0, I seem to consistently get errors on serve for the following:

Warning - [webpack] 'dist': ./node_modules/@pnp/sp-clientsvc/dist/sp-clientsvc.es5.js 879:56-68 "export 'SPHttpClient' was not found in '@pnp/sp' at HarmonyImportSpecifierDependency._getErrors (C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:109:11) at HarmonyImportSpecifierDependency.getWarnings (C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:60:15) at Compilation.reportDependencyErrorsAndWarnings (C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/webpack/lib/Compilation.js:1454:24) at C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/webpack/lib/Compilation.js:1258:10 at AsyncSeriesHook.eval [as callAsync] (eval at create (C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1) at AsyncSeriesHook.lazyCompileHook (C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/tapable/lib/Hook.js:154:20) at Compilation.finish (C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/webpack/lib/Compilation.js:1253:28) at C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/webpack/lib/Compiler.js:672:17 at _done (eval at create (C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1) at eval (eval at create (C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:44:22) @ ./node_modules/@pnp/sp-taxonomy/dist/sp-taxonomy.es5.js @ ./node_modules/@pnp/spfx-property-controls/lib/services/PnPTermStorePickerService.js @ ./node_modules/@pnp/spfx-property-controls/lib/propertyFields/termPicker/PropertyFieldEnterpriseTermPicker.js @ ./node_modules/@pnp/spfx-property-controls/lib/propertyFields/termPicker/enterprise_index.js @ ./node_modules/@pnp/spfx-property-controls/lib/PropertyFieldEnterpriseTermPicker.js @ ./node_modules/@pnp/spfx-property-controls/lib/index.js @ ./lib/webparts/myWebpart/myWebpartWebPart.js ./node_modules/@pnp/sp-taxonomy/dist/sp-taxonomy.es5.js 889:8-10 "export 'sp' was not found in '@pnp/sp' at HarmonyImportSpecifierDependency._getErrors (C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:109:11) at HarmonyImportSpecifierDependency.getWarnings (C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:60:15) at Compilation.reportDependencyErrorsAndWarnings (C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/webpack/lib/Compilation.js:1454:24) at C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/webpack/lib/Compilation.js:1258:10 at AsyncSeriesHook.eval [as callAsync] (eval at create (C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1) at AsyncSeriesHook.lazyCompileHook (C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/tapable/lib/Hook.js:154:20) at Compilation.finish (C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/webpack/lib/Compilation.js:1253:28) at C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/webpack/lib/Compiler.js:672:17 at _done (eval at create (C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1) at eval (eval at create (C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:44:22) @ ./node_modules/@pnp/spfx-property-controls/lib/services/PnPTermStorePickerService.js @ ./node_modules/@pnp/spfx-property-controls/lib/propertyFields/termPicker/PropertyFieldEnterpriseTermPicker.js @ ./node_modules/@pnp/spfx-property-controls/lib/propertyFields/termPicker/enterprise_index.js @ ./node_modules/@pnp/spfx-property-controls/lib/PropertyFieldEnterpriseTermPicker.js @ ./node_modules/@pnp/spfx-property-controls/lib/index.js @ ./lib/webparts/myWebpart/myWebpartWebPart.js ./node_modules/@pnp/sp-clientsvc/dist/sp-clientsvc.es5.js 837:15-28 "export 'toAbsoluteUrl' was not found in '@pnp/sp' at HarmonyImportSpecifierDependency._getErrors (C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:109:11) at HarmonyImportSpecifierDependency.getWarnings (C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:60:15) at Compilation.reportDependencyErrorsAndWarnings (C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/webpack/lib/Compilation.js:1454:24) at C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/webpack/lib/Compilation.js:1258:10 at AsyncSeriesHook.eval [as callAsync] (eval at create (C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1) at AsyncSeriesHook.lazyCompileHook (C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/tapable/lib/Hook.js:154:20) at Compilation.finish (C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/webpack/lib/Compilation.js:1253:28) at C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/webpack/lib/Compiler.js:672:17 at _done (eval at create (C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1) at eval (eval at create (C:/Users/Curtis/Desktop/Project Repositories/myProject/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:44:22) @ ./node_modules/@pnp/sp-taxonomy/dist/sp-taxonomy.es5.js @ ./node_modules/@pnp/spfx-property-controls/lib/services/PnPTermStorePickerService.js @ ./node_modules/@pnp/spfx-property-controls/lib/propertyFields/termPicker/PropertyFieldEnterpriseTermPicker.js @ ./node_modules/@pnp/spfx-property-controls/lib/propertyFields/termPicker/enterprise_index.js @ ./node_modules/@pnp/spfx-property-controls/lib/PropertyFieldEnterpriseTermPicker.js @ ./node_modules/@pnp/spfx-property-controls/lib/index.js @ ./lib/webparts/myWebpart/myWebpart.js

Steps to Reproduce

`{ "name": "myProject", "version": "0.0.1", "private": true, "main": "lib/index.js", "scripts": { "build": "gulp bundle --max_old_space_size=16384", "clean": "gulp clean", "test": "gulp test", "serve": "gulp bundle --custom-serve --max_old_space_size=16384 && fast-serve" }, "dependencies": {

  "@microsoft/decorators": "1.15.2",
  "@microsoft/sp-adaptive-card-extension-base": "1.15.2",
  "@microsoft/sp-application-base": "1.15.2",
  "@microsoft/sp-core-library": "1.15.2",
  "@microsoft/sp-lodash-subset": "1.15.2",
  "@microsoft/sp-office-ui-fabric-core": "1.15.2",
  "@microsoft/sp-property-pane": "1.15.2",
  "@microsoft/sp-webpart-base": "1.15.2",
  "@pnp/core": "^3.5.1",
  "@pnp/graph": "^3.5.1",
  "@pnp/logging": "^3.5.1",
  "@pnp/queryable": "^3.5.1",
  "@pnp/sp": "^3.5.1",
  "@pnp/spfx-controls-react": "3.9.0",
  "@pnp/spfx-property-controls": "3.8.0",
  "@popperjs/core": "^2.11.0",
  "react": "16.13.1",
  "react-ace": "^9.4.4",
  "react-chartjs-2": "^4.1.0",
  "react-dom": "16.13.1",
  "react-file-icon": "^1.1.0",
  "react-headroom": "^3.1.0",
  "react-multistep": "^5.1.0",
  "react-toastify": "9.0.3",
  "tslib": "2.3.1"
},
"devDependencies": {
  "@microsoft/eslint-config-spfx": "1.15.2",
  "@microsoft/eslint-plugin-spfx": "1.15.2",
  "@microsoft/rush-stack-compiler-4.5": "0.2.2",
  "@microsoft/sp-build-web": "1.15.2",
  "@microsoft/sp-module-interfaces": "1.15.2",
  "@microsoft/sp-webpart-workbench": "1.12.1",
  "@rushstack/eslint-config": "2.5.1",
  "@types/bootstrap": "5.1.6",
  "@types/jquery": "^3.5.9",
  "@types/react": "16.9.51",
  "@types/react-dom": "16.9.8",
  "@types/webpack-env": "1.15.2",
  "@types/xml2js": "0.4.9",
  "ajv": "6.12.5",
  "eslint": "8.7.0",
  "eslint-plugin-react-hooks": "4.3.0",
  "gulp": "4.0.2",
  "spfx-fast-serve-helpers": "1.15.2",
  "typescript": "4.5.5",
  "webpack-bundle-analyzer": "^4.5.0"
}

} `

Thanks!

attCurtisHennessy avatar Aug 15 '22 10:08 attCurtisHennessy

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

msftbot[bot] avatar Aug 15 '22 10:08 msftbot[bot]

Hey! This seems to be the a problem with the @pnp/sp packages, not with the SPFx Version! We have the same issues with SPFx Version 1.14.0 and a @pnp/sp version >3!

SmarterJB avatar Sep 19 '22 08:09 SmarterJB