The term 'next' is not recognized as the name of a cmdlet
$ next build
next : The term 'next' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ next build
+ ~~~~
+ CategoryInfo : ObjectNotFound: (next:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Solution
1. Make sure your package.json has a "next build" entry such as :
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
2. Instead of typing "next build", type "yarn build" or "npm build".
Recent Comments