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

[email protected] published package might be missing files #162

Open
Xunnamius opened this issue Jan 28, 2023 · 2 comments
Open

[email protected] published package might be missing files #162

Xunnamius opened this issue Jan 28, 2023 · 2 comments

Comments

@Xunnamius
Copy link

Hi. First, thank you for this package!

I seem to be getting a strange error in version 5.0.0 that I'm not getting when I downgrade to 4.2.0. Essentially:

Version 5.0.0:

Welcome to Node.js v18.13.0.
Type ".help" for more information.
> require('./node_modules/unfetch/dist/unfetch.js')
[Function (anonymous)]
> require('unfetch')
Uncaught:
Error: Cannot find module '/repos/.ergodark/xunn.at/node_modules/unfetch/index.js'
at createEsmNotFoundErr (node:internal/modules/cjs/loader:1060:15)
at finalizeEsmResolution (node:internal/modules/cjs/loader:1053:15)
at resolveExports (node:internal/modules/cjs/loader:538:14)
at Module._findPath (node:internal/modules/cjs/loader:607:31)
at Module._resolveFilename (node:internal/modules/cjs/loader:1025:27)
at Module._load (node:internal/modules/cjs/loader:885:27)
at Module.require (node:internal/modules/cjs/loader:1105:19)
at require (node:internal/modules/cjs/helpers:103:18) {
code: 'MODULE_NOT_FOUND',
path: '/repos/.ergodark/xunn.at/node_modules/unfetch/package.json'
}

Version 4.2.0:

Welcome to Node.js v18.13.0.
Type ".help" for more information.
> require('./node_modules/unfetch/dist/unfetch.js')
[Function (anonymous)]
> require('unfetch')
[Function (anonymous)]

@NickMcBurney
Copy link

@developit any updates on this? PR is awaiting review: #164

@Psychosynthesis
Copy link

Have same error. Import like this:
const fetch = require('unfetch');

Node v14.17.6

package.json:
  "dependencies": {
    "express": "^4.18.2",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "unfetch": "^5.0.0"
  }

Error: Cannot find module '\node_modules\unfetch\index.js'

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

No branches or pull requests

3 participants