デプロイ時にずっと「Initializing」のまま
同プロジェクトでデプロイ中のデプロイメントがあると、それが終わるまで最新のデプロイは「Initializing」になるようです。
now ls
を実行し、いらないデプロイメントを削除してみると治るかもしれません。
build 時
UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '//../../.svgo.yml'
(node:1) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '//../../.svgo.yml'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at e.exports (/var/task/.next/server/static/iqdZhcAsT3LfSmq39Ilkz/pages/_document.js:206:307121)
at new u (/var/task/.next/server/static/iqdZhcAsT3LfSmq39Ilkz/pages/_document.js:18:123)
at TPFN.t.default.r.default.plugin (/var/task/.next/server/static/iqdZhcAsT3LfSmq39Ilkz/pages/_document.js:20:223985)
at n (/var/task/.next/server/static/iqdZhcAsT3LfSmq39Ilkz/pages/_document.js:20:50105)
at /var/task/.next/server/static/iqdZhcAsT3LfSmq39Ilkz/pages/_document.js:206:21288
at
now
(2)へのデプロイ時に、svgo
付近のパス周りで__dirname
がundefined
なのが原因かも。
postcss
とcssnano
を_document.tsx
で使っていたのでこれをやめて、さらにpostcss
とcssnano
をアンインストールして依存から外した。これでsvgo
依存も無くなり表示できるようになった。
TypeError: r.isMemo is not a function
now
(2)へ@now/next
でのデプロイ時に。
Error: pages/index.js from Terser
next.config.js
の Webpack の設定で EnvironmentPlugin
で NODE_ENV=production
と上書きしていたので、これをやめた。
TypeError: Cannot read property 'minify' of undefined
2019-02-04発生。
terser@3.14.1
を指定する
yarn add terser@3.14.1
package.json
のresolutions
に
{
"terser": "3.14.1"
}
export 時
Cannot find module 'pages/_document'
now 用の設定でtarget: 'serverless'
していたのでこれを削除で直った。
Error: Cannot export when target is not server. https://err.sh/zeit/next.js/next-export-serverless
next.config.js
でエクスポートしているオブジェクトにtarget: 'serverless'
となっている可能性があります。静的ビルドの場合ここはtarget: 'server'
(デフォルト値)が正解です。
値を変更後はnext build
、next export
と再度ビルドから行います。