wessberg / rollup-plugin-ts

A TypeScript Rollup plugin that bundles declarations, respects Browserslists, and enables seamless integration with transpilers such as babel and swc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot read properties of undefined (reading 'moduleSpecifier')

wagenet opened this issue · comments

  • Version: 2.0.5
  • Rollup Version: 2.69.0
  • Operating System and version (if applicable): macOS 12.2.1
  • Node Version (if applicable): v16.13.1
  • Does it work with tsc (if applicable): Unclear

Reproduction

PENDING

Expected Behavior

It works.

Actual Behavior

node:internal/process/promises:246
          triggerUncaughtException(err, true /* fromPromise */);
          ^
TypeError [Error]: Cannot read properties of undefined (reading 'moduleSpecifier')
    at getIdForImportSpecifier (/Users/peterwagenet/Development/Javascript/Ember/ember.js/node_modules/rollup-plugin-ts/dist/cjs/index.js:4347:101)
    at getIdForStructurallyEqualNode (/Users/peterwagenet/Development/Javascript/Ember/ember.js/node_modules/rollup-plugin-ts/dist/cjs/index.js:4370:16)
    at getIdForNode (/Users/peterwagenet/Development/Javascript/Ember/ember.js/node_modules/rollup-plugin-ts/dist/cjs/index.js:4390:29)
    at deconflictImportSpecifier (/Users/peterwagenet/Development/Javascript/Ember/ember.js/node_modules/rollup-plugin-ts/dist/cjs/index.js:4728:16)
    at deconflictNode (/Users/peterwagenet/Development/Javascript/Ember/ember.js/node_modules/rollup-plugin-ts/dist/cjs/index.js:5274:16)
    at /Users/peterwagenet/Development/Javascript/Ember/ember.js/node_modules/rollup-plugin-ts/dist/cjs/index.js:5339:166
    at visitNodes (/Users/peterwagenet/Development/Javascript/Ember/ember.js/node_modules/typescript/lib/typescript.js:87656:48)
    at Object.visitEachChild (/Users/peterwagenet/Development/Javascript/Ember/ember.js/node_modules/typescript/lib/typescript.js:88166:57)
    at Object.childContinuation (/Users/peterwagenet/Development/Javascript/Ember/ember.js/node_modules/rollup-plugin-ts/dist/cjs/index.js:5339:133)
    at deconflictNode (/Users/peterwagenet/Development/Javascript/Ember/ember.js/node_modules/rollup-plugin-ts/dist/cjs/index.js:5329:24) {
  code: 'PLUGIN_ERROR',
  plugin: 'Typescript',
  hook: 'generateBundle'
}

Hey there.
To dig into this error, I'm going to need some form of reproduction. Based on the stacktrace here, I'm not in a position to debug under which circumstances the node on which we look up moduleSpecifier can be undefined.