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 1.26.0 regression #64

Closed
yannickl88 opened this issue Oct 29, 2019 · 6 comments
Closed

Rollup 1.26.0 regression #64

yannickl88 opened this issue Oct 29, 2019 · 6 comments

Comments

@yannickl88
Copy link

I found that upgrading to rollup 1.26.0 breaks my build using this plugin.

Example:

// foo.d.ts
export class A {}
export class B {}
// index.d.ts
export * from './foo';
import dts from 'rollup-plugin-dts';

export default [
    {
        input: './index.d.ts',
        output: {
            file: './out.d.ts',
            format: 'es'
        },
        plugins: [
            dts()
        ]
    }
];

Gives the following error:

./index.d.ts → ./out.d.ts...
[!] TypeError: Cannot read property 'value' of undefined
TypeError: Cannot read property 'value' of undefined
    at Module.addExport (/example/node_modules/rollup/dist/rollup.js:9971:40)
    at ExportNamedDeclaration.initialise (/example/node_modules/rollup/dist/rollup.js:6783:22)
    at new NodeBase (/example/node_modules/rollup/dist/rollup.js:3110:14)
    at new ExportNamedDeclaration (/example/node_modules/rollup/dist/rollup.js:6773:1)
    at Program$1.parseNode (/example/node_modules/rollup/dist/rollup.js:3230:27)
    at new NodeBase (/example/node_modules/rollup/dist/rollup.js:3109:14)
    at new Program$1 (/example/node_modules/rollup/dist/rollup.js:8190:1)
    at Module.setSource (/example/node_modules/rollup/dist/rollup.js:9904:20)
    at Promise.resolve.catch.then.then.then (/example/node_modules/rollup/dist/rollup.js:12641:20)
@yannickl88
Copy link
Author

Most likely caused by rollup/rollup#3193

@Swatinem
Copy link
Owner

Swatinem commented Oct 29, 2019 via email

@yannickl88
Copy link
Author

No problem, I've locked my rollup version to 1.25.2 for now which still works fine.

@fengwuxp
Copy link

Encountered the same problem, after reducing the version of the rollup (for example: 1.10.x), there is no problem.

@nonara
Copy link

nonara commented Oct 31, 2019

Same issue. It even happens with empty source. Issue was caused by #3193. They modified the addExport function.

@Swatinem
Copy link
Owner

Swatinem commented Nov 4, 2019

@aleclarson filed this upstream here: rollup/rollup#3210 which seems to fix this issue. I see renovate was also busy bumping to the latest version which is green so I guess I will call this fixed for now, and will look into a proper fix when I catch up with things

@Swatinem Swatinem closed this as completed Nov 4, 2019
nonara added a commit to nonara/ts-patch that referenced this issue Nov 28, 2019
- Added .editorconfig + Code cleanup (to style)
- Bumped dependency versions
- Added --no-audit to npm exec commands (speed improvement)
- Unlocked rollup version (Issue fixed: Swatinem/rollup-plugin-dts#64)
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

4 participants