"Run your node locally", Missing script: "build"

I am trying to develop my own node (for the GLPI V10 API).
Before starting the actual development, I am following the tutorial at this link:
Run your node locally.

However, when I try to run the command npm run build, I get the following error message:

npm ERR! Missing script: "build"
npm ERR! 
npm ERR! To see a list of scripts, run:
npm ERR!   npm run

I have tried running the command in the root folder of my project, as well as in /nodes and /nodes/NasaPics.

What is the error message (if any)?

npm ERR! Missing script: "build"
npm ERR! 
npm ERR! To see a list of scripts, run:
npm ERR!   npm run

Please share your workflow

Not applicable, as I am developing a custom node.

Information on your n8n setup

  • n8n version: (not sure if relevant, but let me know if needed)
  • Database (default: SQLite): (default)
  • n8n EXECUTIONS_PROCESS setting (default: own, main): (default)
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm
  • Operating system: (please let me know if required)

What should I do to fix this issue?
Thanks in advance for your help!

I found my problem.

I’m not sure at which stage it happened, but I generated a package.json file that was very different from the one in the base repository: GitHub - n8n-io/n8n-nodes-starter: Example starter module for custom n8n nodes.

I retrieved the information from this repository and integrated it into my code, which resolved the issue.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.