BuilderIO / gpt-crawler

Crawl a site to generate knowledge files to create your own custom GPT from a URL
https://www.builder.io/blog/custom-gpt
ISC License
18.14k stars 1.88k forks source link

fix: add run swagger js when start server #126

Closed zshnb closed 5 months ago

zshnb commented 5 months ago

Hi, I cloned this repo and try run server in my local, but firstly an error happened

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/zheng/Workbench/github/gpt-crawler/dist/swagger-output.json' imported from /Users/zheng/Workbench/github/gpt-crawler/dist/src/server.js at new NodeError (node:internal/errors:405:5) at finalizeResolution (node:internal/modules/esm/resolve:327:11) at moduleResolve (node:internal/modules/esm/resolve:946:10) at defaultResolve (node:internal/modules/esm/resolve:1132:11) at nextResolve (node:internal/modules/esm/loader:163:28) at ESMLoader.resolve (node:internal/modules/esm/loader:835:30) at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18) at ModuleWrap. (node:internal/modules/esm/module_job:77:40) at link (node:internal/modules/esm/module_job:76:36) { code: 'ERR_MODULE_NOT_FOUND' }

I found in start:server script miss swagger.js generation, so I add this in script.

adityak74 commented 5 months ago

@zshnb Thank you for adding it. I missed it while I merged my server PR.

zshnb commented 5 months ago

@zshnb Thank you for adding it. I missed it while I merged my server PR.

no problem, can you help to merge this pr into main?

adityak74 commented 5 months ago

@databill86 @marcelovicentegc - I think we can review and get this in so that we can fix the server breaking on start.

marcelovicentegc commented 5 months ago

@zshnb would you mind running a quick npm run fmt or rebasing your PR (since https://github.com/BuilderIO/gpt-crawler/pull/69 got merged, which adds a pre-commit hook to run this command) to pass the prettier check?

zshnb commented 5 months ago

@zshnb would you mind running a quick npm run fmt or rebasing your PR (since #69 got merged, which adds a pre-commit hook to run this command) to pass the prettier check?

sure I committed with format

github-actions[bot] commented 5 months ago

:tada: This PR is included in version 1.2.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: