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

replace .env instead of .env-example in dotenvsafe and also instead of globalThis imported fetch from node-fetch directly #53

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mayhim182
Copy link

To avoid exception from being thrown did this

// src/fetch.js (or fetch.mjs if your project is configured to use ES modules)
import fetch from 'node-fetch';

if (typeof fetch !== 'function') {
  throw new Error('Invalid environment: global fetch not defined');
}

…f globalThis imported fetch from 'node-fetch' in chatgpt/build/index.js
@Khyaghobi1361
Copy link

// src/fetch.js (or fetch.mjs if your project is configured to use ES modules)
import fetch from 'node-fetch';

if (typeof fetch !== 'function') {
throw new Error('Invalid environment: global fetch not defined');
}

@Khyaghobi1361
Copy link

[email protected]

@Khyaghobi1361
Copy link

Uploading Screenshot_۲۰۲۳۱۰۲۹-۲۳۵۳۳۸_Chrome.jpg…

@mayhim182
Copy link
Author

can u merge these changes

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

Successfully merging this pull request may close these issues.

2 participants