diff --git a/package.json b/package.json index 19a5941296..4bf89bdd3d 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,9 @@ "version": "3.3.1", "description": "Run Next.js seamlessly on Netlify", "main": "index.js", + "bin": { + "netlify-plugin-nextjs": "src/next-on-netlify.js" + }, "files": [ "helpers/**/*.js", "src", diff --git a/src/index.js b/src/index.js index 6588ab9618..5eb4746dbc 100644 --- a/src/index.js +++ b/src/index.js @@ -43,7 +43,7 @@ const watch = (functionsPath, publishPath) => { const runBuild = debounceFn( async () => { try { - execa.sync('next', ['build'], { stdio: 'inherit' }) + execa.sync('next', ['build'], { stdio: 'inherit', preferLocal: true }) await build(functionsPath, publishPath) } catch (error) { console.log(error) diff --git a/src/next-on-netlify.js b/src/next-on-netlify.js old mode 100644 new mode 100755