Skip to content

Commit 823a55a

Browse files
committed
fix: failBuild was used before it was defined
1 parent 921c95e commit 823a55a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ const isStaticExportProject = require('./helpers/isStaticExportProject')
1616

1717
module.exports = {
1818
async onPreBuild({ netlifyConfig, packageJson: { scripts = {}, dependencies = {} }, utils }) {
19+
const { failBuild } = utils.build
20+
1921
if (!(await hasFramework('next'))) {
2022
return failBuild(`This application does not use Next.js.`)
2123
}
2224

2325
const { build } = netlifyConfig
24-
const { failBuild } = utils.build
25-
2626
// TO-DO: Post alpha, try to remove this workaround for missing deps in
2727
// the next-on-netlify function template
2828
await utils.run.command('npm install next-on-netlify@latest')

0 commit comments

Comments
 (0)