transitive-bullshit / chatgpt-twitter-bot

Twitter bot powered by OpenAI's ChatGPT API. It's aliveeeee 🤖
https://twitter.com/ChatGPTBot
MIT License
735 stars 98 forks source link

Error: Cannot find module 'node:path' #1

Closed kcibdev closed 1 year ago

kcibdev commented 1 year ago

Whenever i try to run the project using npm run dev or npm run build i keep getting this error

$ npm run build

> chatgpt-twitter-bot@0.0.1 prebuild
> run-s clean

> chatgpt-twitter-bot@0.0.1 clean
> del build

Could Not Find C:\Users\bright\Documents\Project\gtp-test\chatgpt-twitter-bot-main\build

> chatgpt-twitter-bot@0.0.1 build
> tsup

Error: Cannot find module 'node:path'
Require stack:
- C:\Users\bright\Documents\Project\gtp-test\chatgpt-twitter-bot-main\node_modules\rollup\dist\shared\rollup.js
- C:\Users\bright\Documents\Project\gtp-test\chatgpt-twitter-bot-main\node_modules\rollup\dist\rollup.js
- C:\Users\bright\Documents\Project\gtp-test\chatgpt-twitter-bot-main\node_modules\tsup\dist\index.js
- C:\Users\bright\Documents\Project\gtp-test\chatgpt-twitter-bot-main\node_modules\tsup\dist\chunk-PDM6VDW3.js
- C:\Users\bright\Documents\Project\gtp-test\chatgpt-twitter-bot-main\node_modules\tsup\dist\cli-default.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (C:\Users\bright\Documents\Project\gtp-test\chatgpt-twitter-bot-main\node_modules\rollup\dist\shared\rollup.js:12:19)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)

I already ran npm install to set everything but it's not working. Please how can i fix this issue

transitive-bullshit commented 1 year ago

What version of node.js?

kcibdev commented 1 year ago

@transitive-bullshit Don't worry I Found the problem all I had to do was to update my node version from v14 to v18 Thanks