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

rollup bundling failing trying to resolve directories #1385

Open
thescientist13 opened this issue Jan 15, 2025 · 0 comments · May be fixed by #1384
Open

rollup bundling failing trying to resolve directories #1385

thescientist13 opened this issue Jan 15, 2025 · 0 comments · May be fixed by #1384
Assignees
Labels
alpha.5 bug Something isn't working CLI v0.31.0
Milestone

Comments

@thescientist13
Copy link
Member

Type of Change

Bug

Summary

Related Issue

Seeing an issue in AnalogStudiosRI/api#44 where Rollup was trying to resolve to the user's workspace?

   Error: Could not load /Users/owenbuckley/Workspace/analogstudiosri/api/src/: EISDIR: illegal operation on a directory, read
    at async readFileHandle (node:internal/fs/promises:553:24)
    at async NodeModulesResource.serve (file:///Users/owenbuckley/Workspace/analogstudiosri/api/node_modules/@greenwood/cli/src/plugins/resource/plugin-node-modules.js:49:18)
    at async Object.load (file:///Users/owenbuckley/Workspace/analogstudiosri/api/node_modules/@greenwood/cli/src/config/rollup.config.js:81:24)
    at async PluginDriver.hookFirstAndGetPlugin (file:///Users/owenbuckley/Workspace/analogstudiosri/api/node_modules/rollup/dist/es/shared/node-entry.js:20712:28)
    at async file:///Users/owenbuckley/Workspace/analogstudiosri/api/node_modules/rollup/dist/es/shared/node-entry.js:19832:33
    at async Queue.work (file:///Users/owenbuckley/Workspace/analogstudiosri/api/node_modules/rollup/dist/es/shared/node-entry.js:20922:32) {
  errno: -21,
  code: 'PLUGIN_ERROR',
  syscall: 'read',
  pluginCode: 'EISDIR',
  plugin: 'commonjs--resolver',
  hook: 'resolveId',
  id: '/Users/owenbuckley/Workspace/analogstudiosri/api/node_modules/qs/lib/index.js'

Details

Doing a little research, and based on the importer

$$$$$ {
  id: './',
  importer: '/Users/owenbuckley/Workspace/analogstudiosri/api/node_modules/call-bind/callBound.js',
  normalizedId: './',
  resolvedUrl: URL {
    href: 'file:///Users/owenbuckley/Workspace/analogstudiosri/api/src/',
    origin: 'null',
    protocol: 'file:',
    username: '',
    password: '',
    host: '',
    hostname: '',
    port: '',
    pathname: '/Users/owenbuckley/Workspace/analogstudiosri/api/src/',
    search: '',
    searchParams: URLSearchParams {},
    hash: ''
  }
}

the culprit is this package which has this code 😞
https://unpkg.com/browse/[email protected]/callBound.js

var callBind = require('./');

Unrelated, seems like Rollup is normalizing our APIs twice?

>>>>> {
  id: 'events',
  inputPath: '/Users/owenbuckley/Workspace/analogstudiosri/api/src/pages/api/events.js'
}
{
  normalizedId: '/Users/owenbuckley/Workspace/analogstudiosri/api/src/pages/api/events.js'
}
{
  normalizedId: '/Users/owenbuckley/Workspace/analogstudiosri/api/src/pages/api/events.js'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha.5 bug Something isn't working CLI v0.31.0
Projects
Status: 🏗 In progress
Development

Successfully merging a pull request may close this issue.

1 participant