# MODULE NOT FOUND Error when trying to deploy code on netlify using CLI and getting 'npm run build' not found issue when trying to deploy code using ui

**URL:** <https://answers.netlify.com/t/module-not-found-error-when-trying-to-deploy-code-on-netlify-using-cli-and-getting-npm-run-build-not-found-issue-when-trying-to-deploy-code-using-ui/137523>\
**Category:** Support\
**Tags:** deployment, authentication, netlify-newbie\
**Created:** [January 18, 2025, 1:23pm UTC](https://answers.netlify.com/t/module-not-found-error-when-trying-to-deploy-code-on-netlify-using-cli-and-getting-npm-run-build-not-found-issue-when-trying-to-deploy-code-using-ui/137523 "2025-01-18T13:23:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harshavardhan](https://avatars.discourse-cdn.com/v4/letter/h/9f8e36/32.png) [@Harshavardhan](https://answers.netlify.com/u/Harshavardhan)\
**Post date:** [January 18, 2025, 1:23pm UTC](https://answers.netlify.com/t/module-not-found-error-when-trying-to-deploy-code-on-netlify-using-cli-and-getting-npm-run-build-not-found-issue-when-trying-to-deploy-code-using-ui/137523/1 "2025-01-18T13:23:19Z")

</div>

I have tried to deploy my express project on netlify(doesn’t have any frontend). I have followed this tutorial - [tutorial](https://www.geeksforgeeks.org/how-to-deploy-expressjs-on-netlify/) but I was facing an issue at the build time

6:10:44 PM: Netlify Build  
6:10:44 PM: ────────────────────────────────────────────────────────────────  
6:10:44 PM: ​  
6:10:44 PM: ❯ Version  
6:10:44 PM: @netlify/build 29.58.3  
6:10:44 PM: ​  
6:10:44 PM: ❯ Flags  
6:10:44 PM: accountId: 678a602a81665b006edfb731  
6:10:44 PM: baseRelDir: true  
6:10:44 PM: buildId: 678ba1081da0899354e11f8a  
6:10:44 PM: deployId: 678ba1081da0899354e11f8c  
6:10:44 PM: ​  
6:10:44 PM: ❯ Current directory  
6:10:44 PM: /opt/build/repo  
6:10:44 PM: ​  
6:10:44 PM: ❯ Config file  
6:10:44 PM: /opt/build/repo/netlify.toml  
6:10:44 PM: ​  
6:10:44 PM: ❯ Context  
6:10:44 PM: production  
6:10:44 PM: ​  
6:10:44 PM: Build command from Netlify app  
6:10:44 PM: ────────────────────────────────────────────────────────────────  
6:10:44 PM: ​  
6:10:44 PM: $ npm run build  
6:10:44 PM: \> backend@1.0.0 build  
6:10:44 PM: \> netlify deploy --prod  
6:10:46 PM: Logging into your Netlify account…  
6:10:46 PM: Opening netlify  
response\_type=ticket&ticket=f53aabbdce99ff481c3ce29c23383132  
6:10:46 PM: - Waiting for authorization…  
6:15:46 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2 (Search results for nocode changes)  
6:15:46 PM: › Error: Timed out waiting for authorization. If you do not have a Netlify account, please create one at , then run netlify login again.  
6:15:46 PM: ​  
6:15:46 PM: “build.command” failed  
6:15:46 PM: ────────────────────────────────────────────────────────────────  
6:15:46 PM: ​  
6:15:46 PM: Error message  
6:15:46 PM: Command failed with exit code 1: npm run build (exit-code-1)  
6:15:46 PM: ​  
6:15:46 PM: Error location  
6:15:46 PM: In Build command from Netlify app:  
6:15:46 PM: npm run build  
6:15:46 PM: ​  
6:15:46 PM: Resolved config  
6:15:46 PM: build:  
6:15:46 PM: command: npm run build  
6:15:46 PM: commandOrigin: ui  
6:15:46 PM: publish: /opt/build/repo/dist  
6:15:46 PM: publishOrigin: ui  
6:15:46 PM: functionsDirectory: /opt/build/repo/functions  
6:15:46 PM: Build failed due to a user error: Build script returned non-zero exit code: 2  
6:15:46 PM: Failing build: Failed to build site  
6:15:47 PM: Finished processing build request in 5m43.296s

and when I tried to deploy using ‘npm un build’ command locally I was getting this error

❯ Context  
✔ Finished uploading blobs to deploy store  
✔ No cached functions were found  
⠴ Hashing index.html › Warning:  
{  
“code”: “MODULE\_NOT\_FOUND”,  
“requireStack”: [  
“/Users/pinreddy/.nvm/versions/node/v20.17.0/lib/node\_modules/netlify-cli/node\_modules/@netlify/zip-it-and-ship-it/dist/runtimes/node/bundlers/zisi/resolve.js”  
]  
}

› Error: In file “/Users/pinreddy/Desktop/foodCourt/backend/functions/app.js”  
Cannot find module ‘call-bound’  
Require stack:

- /Users/pinreddy/.nvm/versions/node/v20.17.0/lib/node\_modules/netlify-cli/node\_modules/@netlify/zip-it-and-ship-it/dist/runtimes/node/bundlers/zisi/resolve.js

can someone check on this I tried - [fix](https://answers.netlify.com/t/command-failed-with-exit-code-1-ci-npm-run-build-https-ntl-fyi-exit-code-1-with-ci-npm-run-build/89581/7) but had no luck.

I am attaching my repo link - [https://github.com/harshavardhanpinnapureddy/foodcourt/tree/backend\_db](https://github.com/harshavardhanpinnapureddy/foodcourt/tree/backend_db)

---

<div class="post-metadata">

**Author:** ![clarnx](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/clarnx/32/40777_2.png) [@clarnx](https://answers.netlify.com/u/clarnx)\
**Post date:** [January 19, 2025, 10:41am UTC](https://answers.netlify.com/t/module-not-found-error-when-trying-to-deploy-code-on-netlify-using-cli-and-getting-npm-run-build-not-found-issue-when-trying-to-deploy-code-using-ui/137523/2 "2025-01-19T10:41:29Z")

</div>

Hi @Harshavardhan, thanks for the post. I’m happy to help.  
First, you are missing some modules based on the deploy logs you shared.

> [@Harshavardhan](#):
>
> Cannot find module ‘call-bound’

Kindly check your `package.json` again and then compare it to your build logs to find modules or packages that are not installed.

In addition to troubleshooting your code, you can find helpful support guides on troubleshooting builds at [[Support Guide] Compiled Build and Deploy Resources – start here!](https://answers.netlify.com/t/support-guide-compiled-build-and-deploy-resources-start-here/50679/11)

Thanks

---

<div class="post-metadata">

**Author:** ![hrishikesh](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/hrishikesh/32/74607_2.png) [@hrishikesh](https://answers.netlify.com/u/hrishikesh)\
**Post date:** [January 19, 2025, 11:36am UTC](https://answers.netlify.com/t/module-not-found-error-when-trying-to-deploy-code-on-netlify-using-cli-and-getting-npm-run-build-not-found-issue-when-trying-to-deploy-code-using-ui/137523/3 "2025-01-19T11:36:25Z")

</div>

I’d recommend running `npm i -g npm` again.

As far as deploying via Git, you should not be using Netlify CLI on Netlify builds.
