How can I customize the node dependency function when using require () in Dify's Node code execution node and getting the error module_not_found #11327

Closed
opened 2026-02-21 18:58:23 -05:00 by yindo · 0 comments
Owner

Originally created by @xiawenbin on GitHub (Mar 17, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.15.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

/loader:1023:12) { code: 'MODULE_NOT_FOUND', requireStack: [ '/tmp/sandbox-511c987b-22d6-4092-a1ba-0a8d1f8ed485/var/sandbox/sandbox-nodejs/nodejs-project/node_temp/node_temp/test.js' ] } Node.js v20.11.1 temp/test.js at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15) at Module._load (node:internal/modules/cjs/loader:985:27) at Module.require (node:internal/modules/cjs/loader:1235:19) at require (node:internal/modules/helpers:176:18) at main (/tmp/sandbox-511c987b-22d6-4092-a1ba-0a8d1f8ed485/var/sandbox/sandbox-nodejs/nodejs-project/node_temp/node_temp/test.js:18:19) at Object. (/tmp/sandbox-511c987b-22d6-4092-a1ba-0a8d1f8ed485/var/sandbox/sandbox-nodejs/nodejs-project/node_temp/node_temp/test.js:64:18) at Module._compile (node:internal/modules/cjs/loader:1376:14) at Module._extensions..js (node:internal/modules/cjs/loader:1435:10) at Module.load (node:internal/modules/cjs/loader:1207:32) at Module._load (node:internal/modules/cjs/loader:1023:12) { code: 'MODULE_NOT_FOUND', requireStack: [ '/tmp/sandbox-511c987b-22d6-4092-a1ba-0a8d1f8ed485/var/sandbox/sandbox-nodejs/

Image

Image

nodejs-project/node_temp/node_temp/test.js' ] } Node.js v20.11.1 error: exit status 1

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @xiawenbin on GitHub (Mar 17, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.15.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce /loader:1023:12) { code: 'MODULE_NOT_FOUND', requireStack: [ '/tmp/sandbox-511c987b-22d6-4092-a1ba-0a8d1f8ed485/var/sandbox/sandbox-nodejs/nodejs-project/node_temp/node_temp/test.js' ] } Node.js v20.11.1 temp/test.js at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15) at Module._load (node:internal/modules/cjs/loader:985:27) at Module.require (node:internal/modules/cjs/loader:1235:19) at require (node:internal/modules/helpers:176:18) at main (/tmp/sandbox-511c987b-22d6-4092-a1ba-0a8d1f8ed485/var/sandbox/sandbox-nodejs/nodejs-project/node_temp/node_temp/test.js:18:19) at Object.<anonymous> (/tmp/sandbox-511c987b-22d6-4092-a1ba-0a8d1f8ed485/var/sandbox/sandbox-nodejs/nodejs-project/node_temp/node_temp/test.js:64:18) at Module._compile (node:internal/modules/cjs/loader:1376:14) at Module._extensions..js (node:internal/modules/cjs/loader:1435:10) at Module.load (node:internal/modules/cjs/loader:1207:32) at Module._load (node:internal/modules/cjs/loader:1023:12) { code: 'MODULE_NOT_FOUND', requireStack: [ '/tmp/sandbox-511c987b-22d6-4092-a1ba-0a8d1f8ed485/var/sandbox/sandbox-nodejs/ ![Image](https://github.com/user-attachments/assets/2e411dfc-8325-4d45-a82f-9b9b943bb8f9) ![Image](https://github.com/user-attachments/assets/9b0522c9-424f-497a-988c-046eaec34603) nodejs-project/node_temp/node_temp/test.js' ] } Node.js v20.11.1 error: exit status 1 ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo closed this issue 2026-02-21 18:58:23 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#11327