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

Error: Unknown object type "asyncfunction" #92

Closed
arnaud-zg opened this issue Jan 3, 2020 · 4 comments
Closed

Error: Unknown object type "asyncfunction" #92

arnaud-zg opened this issue Jan 3, 2020 · 4 comments

Comments

@arnaud-zg
Copy link

arnaud-zg commented Jan 3, 2020

Since last release v0.5.0, there is an issue with compilation;

Logs

[!] (plugin rpt2) Error: Unknown object type "asyncfunction"
src/index.ts
Error: Unknown object type "asyncfunction"
    at Object._object (/home/travis/build/[secure]/[secure]/node_modules/rollup-plugin-typescript2/node_modules/object-hash/index.js:218:17)
    at Object._function (/home/travis/build/[secure]/[secure]/node_modules/rollup-plugin-typescript2/node_modules/object-hash/index.js:319:14)
    at Object.dispatch (/home/travis/build/[secure]/[secure]/node_modules/rollup-plugin-typescript2/node_modules/object-hash/index.js:185:30)
    at /home/travis/build/[secure]/[secure]/node_modules/rollup-plugin-typescript2/node_modules/object-hash/index.js:246:18
    at Array.forEach (<anonymous>)
    at Object._object (/home/travis/build/[secure]/[secure]/node_modules/rollup-plugin-typescript2/node_modules/object-hash/index.js:242:21)
    at Object.dispatch (/home/travis/build/[secure]/[secure]/node_modules/rollup-plugin-typescript2/node_modules/object-hash/index.js:185:30)
    at /home/travis/build/[secure]/[secure]/node_modules/rollup-plugin-typescript2/node_modules/object-hash/index.js:260:23
    at Array.forEach (<anonymous>)
    at Object._array (/home/travis/build/[secure]/[secure]/node_modules/rollup-plugin-typescript2/node_modules/object-hash/index.js:259:20)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@maxdavidson
Copy link
Owner

Looks like this is an issue with rollup-plugin-typescript2 failing if a plugin uses async functions ezolenko/rollup-plugin-typescript2#105.

Please check https://github.com/ezolenko/rollup-plugin-typescript2#plugins-using-asyncawait for a workaround.

@slikts
Copy link

slikts commented Jan 6, 2020

Fixed this by replacing rollup-plugin-typescript with @wessberg/rollup-plugin-ts.

@wordisthebird
Copy link

Fixed this by replacing rollup-plugin-typescript with @wessberg/rollup-plugin-ts.

Can you explain what you did please?

@erhathaway
Copy link

@wordisthebird you probably already figured this out, but for future people who come here: rollup-plugin-typescript or some other library is probably out of date and you just need to replace the reference (as seen here) or upgrade it npm install <package name>. You can figure out what node_module is out of date by looking at the stack trace and seeing which one corresponds with this error.

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

5 participants