Open tandrasi opened 1 week ago
The same issue
Same issue, compared with ootb 1.19 generated webpart, same npm versions, webpack throws a bunch of [object Object] errors without further details.
Same issue
I had the same exact issue. For me it boiled down to some CSS references that where not done according to documentation, and top level imports of Fluent UI components that for some reason used an unsupported reference path (deeper than for example @fluentui/react/lib/Pickers.
All of this worked fine in 1.18.2 but failed after upgrading to 1.19.0. After fixing the issues mentioned above all of those [object Object] errors disappeared in my project and all worked as before.
I had the same exact issue. For me it boiled down to some CSS references that where not done according to documentation, and top level imports of Fluent UI components that for some reason used an unsupported reference path (deeper than for example @fluentui/react/lib/Pickers.
All of this worked fine in 1.18.2 but failed after upgrading to 1.19.0. After fixing the issues mentioned above all of those [object Object] errors disappeared in my project and all worked as before.
OK, say that this is the case with import reference paths being longer, how would I fix the following imports? This snippet I'm showing from my ThemeProvider.ts file is definitely the culprit for 2 out of my 8 [object Object] errors because once I remove some of the property pane references from pnp/spfx-property-controls, it works:
import {
ThemeProvider as msThemeProvider
} from '@microsoft/sp-component-base';
import ThemeGenerator from '../generators/ThemeGenerator';
import ColorHelper from '../helpers/ColorHelper';
import tinycolor from 'tinycolor2';
import IBaseThemingProps from '../typings/interfaces/base-webpart-props/IBaseThemingProps';
import { PropertyFieldColorPicker, PropertyFieldColorPickerStyle } from '@pnp/spfx-property-controls/lib/PropertyFieldColorPicker';
import { PropertyFieldSwatchColorPicker, PropertyFieldSwatchColorPickerStyle, IPropertyFieldSwatchColorOption } from '@pnp/spfx-property-controls/lib/PropertyFieldSwatchColorPicker';
import { IPropertyPaneDropdownOption, IPropertyPaneField, PropertyPaneToggle, PropertyPaneDropdown, PropertyPaneDropdownOptionType, PropertyPaneSlider } from '@microsoft/sp-property-pane';
import { update } from '@microsoft/sp-lodash-subset';
import BaseThemingPropsEnum from '../enums/BaseThemingPropsEnum';
import { createTheme, mergeStyles } from '@fluentui/react';
import WebFont from 'webfontloader';
import GoogleFontFamilies from '../data/GoogleFontFamilies';
import React from 'react';
import { PropertyPaneSeparator } from '../property-pane/PropertyPaneSeparator';
import { PropertyPaneSpacer } from '../property-pane/PropertyPaneSpacer';
import SPHelper from '../helpers/SPHelper';
import ThemeHelper from '../helpers/ThemeHelper';
Hello, Similar issue here. The solution provided by @jensotto with reference paths worked for 3 over my 4 warnings. However for the last one, it was coming from : import { Placeholder } from "@pnp/spfx-controls-react/lib/Placeholder";
I tried several reference paths but none is working, apparently same as what @tandrasi has with pnp/spfx-property-controls. So it appears to impact all kind of react component libraries. Didn't find a workaround yet for this one (except embedding the component which is not the point obviously).
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
π₯ SharePoint Framework
Developer environment
Windows
What browser(s) / client(s) have you tested
Additional environment details
Describe the bug / error
Everything else being equal, upgrading our current React projects from 1.18.2 to 1.19.0 causes us to get errors during webpack's build process. The issue is that it doesn't say what the errors are, just "[object Object]". Multiple error lines exist depending on the files included in the build. It is impossible to isolate what is exactly causing the issues, but I have a .ts file I know is causing at least one of the build failures (just reach out if you would like to see it).
Please note:
Steps to reproduce
Expected behavior
I expect no errors in the build, just like there were no errors in previous SPFx versions.