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

Failed to import - node-fetch-native #422

Closed
paulshen opened this issue Sep 23, 2022 · 2 comments
Closed

Failed to import - node-fetch-native #422

paulshen opened this issue Sep 23, 2022 · 2 comments
Labels
browser Not working in Browser

Comments

@paulshen
Copy link

Failing module

import 'https://esm.sh/@notionhq/client'
import 'https://esm.sh/@tensorflow/tfjs'

Error message

These modules have node-fetch-native as a dependency. However, https://esm.sh/v95/node-fetch-native@0.1.3/es2022/node-fetch-native.js returns a 500

/* esm.sh - error */
throw new Error("[esm.sh] " + "npm: can't get metadata of package 'process/browser' (405 Method Not Allowed: {\"code\":\"MethodNotAllowedError\",\"message\":\"GET is not allowed\"})");
export default null;

Additional info

  • esm.sh version: 95
  • Browser version:
    Arc Version 0.69.0 (34772)
    Chromium Engine Version 105.0.5195.127
@paulshen paulshen added the browser Not working in Browser label Sep 23, 2022
@ije
Copy link
Member

ije commented Sep 30, 2022

this should be fixed in last update

@paulshen
Copy link
Author

paulshen commented Oct 1, 2022

@ije Awesome thank you! That loads fine now.

Unfortunately, the parent packages still don't load because node-fetch-native depends on worker_threads. I see a request to https://esm.sh/error.js?type=unsupported-nodejs-builtin-module&name=worker_threads&importer=node-fetch-native. It'd be great to get this working in the browser.

Thanks again for your great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser Not working in Browser
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants