Build Project (cmd+F9) does not do anything in a nodejs or nextjs project
Answered
I am used to “build project" (cmd+F9 on mac) to compile my sourcecode for Scala/Kotlin/Java projects and it works like a charm and lists me clickable compile errors when something is wrong.
Now I setup a nextjs project (with typescript_ and I can't get “build project” to do the same. IntelliJ recognizes typescript errors and such inline in the editor - but I'd like it to give me an inline summary of the errors in my project (or module) using a shortcut.
What can I do?
Please sign in to leave a comment.
JavaScript projects don't have any standard build procedure, the way they are built depend on the frameworks and bundlers being used. Next.js apps are typically built using the
next build
command (see https://nextjs.org/docs/app/api-reference/next-cli#build). Usually they are run as NPM scripts from the package.json. Next.js apps created withcreate-next-app
have the corresponding scripts pre-created. Open your package.json in the editor, click the Run icon in the gutter next to thebuild
script, or runnpm run build
in the Terminal , or double-click the build task in the npm tool window (View | Tool Windows | npm).