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

npm start的时候出错 #3

Open
eaglepie opened this issue Apr 25, 2022 · 2 comments
Open

npm start的时候出错 #3

eaglepie opened this issue Apr 25, 2022 · 2 comments

Comments

@eaglepie
Copy link

执行npm start后错误提示如下:

$ npm start

[email protected] start
nodemon ./bin/www

[nodemon] 2.0.15
[nodemon] to restart at any time, enter rs
[nodemon] watching path(s): .
[nodemon] watching extensions: js,mjs,json
[nodemon] starting node ./bin/www
node:internal/modules/cjs/loader:936
throw err;
^

Error: Cannot find module 'http-errors'
Require stack:

  • E:\TikTokDownload-main\TikTokWeb\app.js
  • E:\TikTokDownload-main\TikTokWeb\bin\www
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object. (E:\TikTokDownload-main\TikTokWeb\app.js:1:19)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    'E:\TikTokDownload-main\TikTokWeb\app.js',
    'E:\TikTokDownload-main\TikTokWeb\bin\www'
    ]
    }
    [nodemon] app crashed - waiting for file changes before starting...
@lingr7
Copy link

lingr7 commented Apr 25, 2022

要是你的场景可以用docker容器workaround,可以用我这个PR的内容,#2
,里面写了Dockerfile成功用docker解决了。

Johnserf-Seed added a commit that referenced this issue Apr 9, 2023
Johnserf-Seed added a commit that referenced this issue Sep 3, 2023
1、让路由文件更加简洁
2、错误处理中间件
Johnserf-Seed added a commit that referenced this issue Sep 3, 2023
@Johnserf-Seed
Copy link
Owner

使用新镜像即可

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

3 participants