admin管理员组文章数量:1384246
This is running build but,
import styles from '../styles/Home.module.css'
export default function Home() {
return (
<div className={styles.container}>
<title>Filmydom</title>
<h1>Filmydom</h1>
<tagline>Lets be Filmy</tagline>
<br />
<br />
<h3>Coming Soon</h3>
</div>
)
}
This is not
import styles from '../styles/Home.module.css'
export default function Home() {
return (
<div className={styles.container}>
<title>Filmydom</title>
<h1>Filmydom</h1>
<tagline>Let's be Filmy</tagline>
<br />
<br />
<h3>Coming Soon</h3>
</div>
)
}
Just because the tagline contains " ' ".
This happened when I was trying to build and deploy on firebase.
How to build with Apostrophe.
This is running build but,
import styles from '../styles/Home.module.css'
export default function Home() {
return (
<div className={styles.container}>
<title>Filmydom</title>
<h1>Filmydom</h1>
<tagline>Lets be Filmy</tagline>
<br />
<br />
<h3>Coming Soon</h3>
</div>
)
}
This is not
import styles from '../styles/Home.module.css'
export default function Home() {
return (
<div className={styles.container}>
<title>Filmydom</title>
<h1>Filmydom</h1>
<tagline>Let's be Filmy</tagline>
<br />
<br />
<h3>Coming Soon</h3>
</div>
)
}
Just because the tagline contains " ' ".
This happened when I was trying to build and deploy on firebase.
How to build with Apostrophe.
Share Improve this question asked Aug 29, 2021 at 18:29 user15991162user159911624 Answers
Reset to default 5Is tagline
a valid HTML Element? I wonder if that could be contributing to this odd behavior.
Otherwise could try string literal:
export default function Home() {
return (
<div className={styles.container}>
<title>Filmydom</title>
<h1>Filmydom</h1>
<tagline>{`Let's be Filmy`}</tagline>
<br />
<br />
<h3>Coming Soon</h3>
</div>
)
}
You can use '
for the Apostrophe to build successfully.
I was able to clear an error like this by replacing the apostrophe with the universal html symbol like the following:
Space ( ) is  
Exclamation mark (!) is !
Double quotation (“) is "
Number sign (#) is #
Percent sign (%) is %
Comma (,) is ,
Hyphen (-) is -
Period (.) is .
Slash (/) is /
And of course... Apostrophe (') is '
Example
Error prone
<p>Let's connect!</p>
Clean
<p>Let's connect!</p>
I just updated .eslintrc.json with this following code
"react/no-unescaped-entities": "off"
本文标签: javascriptNext JS build not working with ApostropheStack Overflow
版权声明:本文标题:javascript - Next JS build not working with Apostrophe - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744518319a2610299.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论