nextjs-netlify-cms icon indicating copy to clipboard operation
nextjs-netlify-cms copied to clipboard

Error when run ">npm run build" on window 11.

Open VGuanCentra opened this issue 3 years ago • 0 comments

Failed to compile.

./pages/admin.tsx:4:3 Type error: Argument of type '() => Promise<void | ComponentClass<never, any> | FunctionComponent | { default: ComponentType; }>' is not assignable to parameter of type 'DynamicOptions<{}> | (() => LoaderComponent<{}>) | LoaderComponent<{}>'. Type '() => Promise<void | ComponentClass<never, any> | FunctionComponent | { default: ComponentType; }>' is not assignable to type '() => LoaderComponent<{}>'. Type 'Promise<void | ComponentClass<never, any> | FunctionComponent | { default: ComponentType; }>' is not assignable to type 'LoaderComponent<{}>'. Type 'void | ComponentClass<never, any> | FunctionComponent | { default: ComponentType; }' is not assignable to type 'ComponentClass<{}, any> | FunctionComponent<{}> | { default: ComponentType<{}>; }'. Type 'void' is not assignable to type 'ComponentClass<{}, any> | FunctionComponent<{}> | { default: ComponentType<{}>; }'.

2 | import config from '../cms/config'; 3 | const CMS = dynamic(

4 | () => | ^ 5 | import('netlify-cms-app').then((cms) => { 6 | cms.init({ config }); 7 | }), info - Creating an optimized production build .

VGuanCentra avatar Jan 26 '22 20:01 VGuanCentra