bytemate / chatapi-single

Simple and powerful ChatGPT-API-Server
534 stars 75 forks source link

Unable to start #1

Closed missuo closed 1 year ago

missuo commented 1 year ago

I noticed that the start command in package.json is node dist/src/index.js, but there is no dist directory in the project, so it won't start.

npm run dev is fine!

➜  chatapi-single git:(main) ✗ npm run start

> chatgpt-api-single@1.0.0 start
> node dist/src/index.js

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

Error: Cannot find module '/Users/vincent/Downloads/chatapi-single/dist/src/index.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1060:15)
    at Module._load (node:internal/modules/cjs/loader:905: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 v19.6.0
zhangcheng commented 1 year ago

Need to do npm run build first, and then maybe to modify package.json, since only dist/index.js exists.