For the record, C# runs nodejs to call the js file and prompts an error: Error: node:internal/modules/cjs/loader:1080

For personal records, C# runs nodejs to call the js file and prompts an error:

Error message:

Error: node:internal/modules/cjs/loader:1080

throw err;   ^  Error: Cannot find module 'F:\鎴戠殑....................”

...................There are still a lot of error content below

There is also a prompt that the English prompt module is not found.

My other file runs without error, and it runs normally with data. Then compare the file names of the two C# projects. If the file name appears empty " " or in Chinese format, or the folder name is such as: "name - 2.8", the above error may be reported Content error.

Solution:

Modify the file name to English format and do not leave a space to avoid error. The file name should be in English format. For example, if you change the project name of the code to: "name" or "name-2.8", it will run normally without error. problem solved.

Guess you like

Origin blog.csdn.net/m0_58015531/article/details/132204894