Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行时出现MODULE_NOT_FOUND #9

Open
ClarkWain opened this issue Aug 15, 2023 · 1 comment
Open

运行时出现MODULE_NOT_FOUND #9

ClarkWain opened this issue Aug 15, 2023 · 1 comment

Comments

@ClarkWain
Copy link

在 android termux下执行 npm start 的时候出现下面错误:

~/ddns-at-home $ npm start

[email protected] start
cross-env NODE_ENV=development node lib/index.js

node:internal/modules/cjs/loader:1073
throw err;
^

Error: Cannot find module '/data/data/com.termux/files/home/ddns-at-home/lib/index.js'
at Module._resolveFilename (node:internal/modules/cjs/loader:1070:15)
at Module._load (node:internal/modules/cjs/loader:923:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
at node:internal/main/run_main_module:23:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}

Node.js v20.2.0

文件列表:

total 192
-rw-------   1 u0_a198 u0_a198   7652 Aug 15 23:12 LICENSE
drwx------   5 u0_a198 u0_a198   4096 Aug 15 23:17 app
-rw-------   1 u0_a198 u0_a198    294 Aug 15 23:12 ecosystem.config.js
drwx------ 132 u0_a198 u0_a198   4096 Aug 15 23:27 node_modules
-rw-------   1 u0_a198 u0_a198 128665 Aug 15 23:31 package-lock.json
-rw-------   1 u0_a198 u0_a198   1237 Aug 15 23:27 package.json
-rw-------   1 u0_a198 u0_a198  10371 Aug 15 23:12 readme.md
-rw-------   1 u0_a198 u0_a198    832 Aug 15 23:22 settings.json
-rw-------   1 u0_a198 u0_a198    811 Aug 15 23:12 settings.sample.json
-rw-------   1 u0_a198 u0_a198   6755 Aug 15 23:12 settings.schema.json
drwx------   5 u0_a198 u0_a198   4096 Aug 15 23:12 src
-rw-------   1 u0_a198 u0_a198   5444 Aug 15 23:12 tsconfig.json
~/ddns-at-home $
@pboymt
Copy link
Owner

pboymt commented Aug 15, 2023

package.json 里面 scripts 我忘了改了,还是 lib/index.js ,因为后来都没用过。

你直接 node . 运行应该是能运行的。😂

如果想更改 package.json 的话,替换成 app/index.js 就行。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants