Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.4k views
in Technique[技术] by (71.8m points)

next.js - style props in Nextjs

Server Error Error: The style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.

This error happened while generating the page. Any console logs will be displayed in the terminal window. Source pages_document.tsx (90:33) @ Function.getInitialProps

88 | } 89 |

90 | const { html, head } = await ctx.renderPage({ enhanceApp }) | ^ 91 | const styles = [...flush()] 92 | return { html, head, styles } 93 | }`event - build page: /next/dist/pages/_error wait - compiling... warn - ./node_modules/next/Link.js There are multiple modules with names that only differ in casing. This can lead to unexpected behavior when compiling on a filesystem with other case-semantic. Use equal casing. Compare these module identifiers:

  • C:xampphtdocs extjsonnakhanna ode_modules extLink.js Used by 6 module(s), i. e. C:xampphtdocs extjsonnakhanna ode_modules@next eact-refresh-utilsloader.js!C:xampphtdocs extjsonnakhanna ode_modules extdistuildwebpackloaders ext-babel-loader.js??ref--4-1!C:xampphtdocs extjsonnakhannacomponentsheader.js
  • C:xampphtdocs extjsonnakhanna ode_modules extlink.js Used by 12 module(s), i. e. C:xampphtdocs extjsonnakhanna ode_modules@next eact-refresh-utilsloader.js!C:xampphtdocs extjsonnakhanna ode_modules extdistuildwebpackloaders ext-babel-loader.js??ref--4-1!C:xampphtdocs extjsonnakhannapagesindex.js

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...