Thanks to visit codestin.com
Credit goes to github.com

Skip to content

@rollup/plugin-node-resolve The "path" argument must be of type string or an instance of URL. Received null #1907

@vanaigr

Description

@vanaigr
  • Rollup Plugin Name: @rollup/plugin-node-resolve
  • Rollup Plugin Version: 16.0.2
  • Rollup Version: 4.52.4
  • Operating System (or Browser): StackBlitz
  • Node Version: v20.19.1
  • Link to reproduction (⚠️ read below): https://stackblitz.com/edit/rollup-repro-wnvvhepj

Expected Behavior

Rollup build should complete.

Actual Behavior

@rollup/plugin-node-resolve does not resolve imports of this type in package.json:

    "imports": {
        "#foobar/*": "@rocicorp/zero/*"
    },

With this error:

[!] (plugin node-resolve) TypeError: The "path" argument must be of type string or an instance of URL. Received null

Additional Information

Running node src/main.js does work and the package is resolved (it fails later with not being able to find bindings, but the module is resolved. I couldn't find a better package that has both @name/name structure and has multiple exports. The same error happens with other packages that have these 2 properties [maybe only one is needed], but the only public package I know of is the one in the example).

Metadata

Metadata

Assignees

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