This repository was archived by the owner on May 10, 2021. It is now read-only.
This repository was archived by the owner on May 10, 2021. It is now read-only.
i18n fails to build #71
Closed
Description
Hello 👋
I noticed that I can't build my site when using the new i18n feature. I built dummy repository in which I reproduce the issue.
Page Size First Load JS
┌ ○ / 3.44 kB 65.9 kB
├ /_app 0 B 62.5 kB
├ ○ /404 3.44 kB 65.9 kB
├ λ /api/hello 0 B 62.5 kB
└ ● /hello 3.45 kB 65.9 kB
+ First Load JS shared by all 62.5 kB
├ chunks/f6078781a05fe1bcb0902d23dbbb2662c8d200b3.6d88ef.js 11.4 kB
├ chunks/framework.9116e7.js 41.8 kB
├ chunks/main.fa2ed4.js 7.99 kB
├ chunks/pages/_app.333f97.js 529 B
├ chunks/webpack.e06743.js 751 B
└ css/6e9ef204d6fd7ac61493.css 194 B
λ (Lambda) server-side renders at runtime (uses getInitialProps or getServerSideProps)
○ (Static) automatically rendered as static HTML (uses no initial props)
● (SSG) automatically generated as static HTML + JSON (uses getStaticProps)
(ISR) incremental static regeneration (uses revalidate in getStaticProps)
> serverless-i18n@0.1.0 postbuild C:\Users\<user>\Code\serverless-i18n
> next-on-netlify
� Next on Netlify �
Functions directory: out_functions\
Publish directory: out_publish\
Make sure these are set in your netlify.toml file.
�️ Copying public\ folder to out_publish\
� Copying static NextJS assets to out_publish\
� Setting up API endpoints as Netlify Functions in out_functions\
pages/api/hello.js
� Setting up pages with getInitialProps as Netlify Functions in out_functions\
� Setting up pages with getServerSideProps as Netlify Functions in out_functions\
� Copying pre-rendered pages with getStaticProps and JSON data to out_publish\
/hello
internal/fs/utils.js:298
throw err;
^
Error: ENOENT: no such file or directory, stat '.next\serverless\pages\hello.html'
at Object.statSync (fs.js:1042:3)
at Object.statSync (C:\Users\<user>\Code\serverless-i18n\node_modules\graceful-fs\polyfills.js:307:34)
at statSync (C:\Users\<user>\Code\serverless-i18n\node_modules\fs-extra\lib\util\stat.js:10:52)
at getStatsSync (C:\Users\<user>\Code\serverless-i18n\node_modules\fs-extra\lib\util\stat.js:24:19)
at Object.checkPathsSync (C:\Users\<user>\Code\serverless-i18n\node_modules\fs-extra\lib\util\stat.js:49:33)
at copySync (C:\Users\<user>\Code\serverless-i18n\node_modules\fs-extra\lib\copy-sync\copy-sync.js:24:38)
at setupStaticFileForPage (C:\Users\<user>\Code\serverless-i18n\node_modules\next-on-netlify\lib\helpers\setupStaticFileForPage.js:11:3)
at C:\Users\<user>\Code\serverless-i18n\node_modules\next-on-netlify\lib\pages\getStaticProps\setup.js:26:5
at Array.forEach (<anonymous>)
at setup (C:\Users\<user>\Code\serverless-i18n\node_modules\next-on-netlify\lib\pages\getStaticProps\setup.js:21:9) {
errno: -4058,
syscall: 'stat',
code: 'ENOENT',
path: '.next\\serverless\\pages\\hello.html'
}
Te repository that reproduces the issue can be accessed here, just run the following
npm i
npm run build
It is a standard next.js application using:
- next:
10.0.0
- next-on-netlify:
2.6.0
Something interesting to note is that the site builds correctly when I omit the getStaticProps
in hello.js
.