Skip to content

TypeError [ERR_INVALID_ARG_TYPE]: The "superCtor.prototype" property must be of type object. Received undefined #488

Description

@btakita

When using rollup without vite...the following error occurs on pnpm install:

TypeError [ERR_INVALID_ARG_TYPE]: The "superCtor.prototype" property must be of type object. Received undefined
│     at new NodeError (node:internal/errors:387:5)
│     at inherits (node:util:243:11)
│     at Object.<anonymous> (/home/brian/project/node_modules/.pnpm/bl@5.0.0/node_modules/bl/bl.js:36:1)
│     at Module._compile (node:internal/modules/cjs/loader:1126:14)
│     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
│     at Module.load (node:internal/modules/cjs/loader:1004:32)
│     at Function.Module._load (node:internal/modules/cjs/loader:839:12)
│     at Module.require (node:internal/modules/cjs/loader:1028:19)
│     at require (node:internal/modules/cjs/helpers:102:18)
│     at Object.<anonymous> (/home/brian/project/node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/extract.
│   code: 'ERR_INVALID_ARG_TYPE'

Note that I use .pnpmfile.cjs to alias readable-stream with vite-compatible-readable-stream. I don't see an issues tab with https://github.com/exogee-technology/readable-stream, so I'm raising the issue here. Hopefully the circular dependency with readable-stream will be fixed so the vite-compatible-readable-stream fork would not be necessary.

function readPackage(pkg) {
  if (pkg.dependencies && pkg.dependencies['readable-stream']) {
    pkg.dependencies['readable-stream'] = 'npm:vite-compatible-readable-stream@latest'
  }
  return pkg
}

module.exports = {
  hooks: {
    readPackage
  }
}

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions