Skip to content
This repository was archived by the owner on Aug 6, 2026. It is now read-only.
This repository was archived by the owner on Aug 6, 2026. It is now read-only.

Some runs fail: error: Expected a JavaScript or TypeScript module #67

Closed

Description

@weirdyang
Error: Command failed: NO_COLOR=true deno run -q --allow-read --allow-write --allow-run --allow-net --allow-env --unstable post-process.js data.json
Warning Implicitly using latest version (1.0.0) for https://deno.land/x/url_join/mod.ts
error: Expected a JavaScript or TypeScript module, but identified a Unknown module. Importing these types of modules is currently not supported.
  Specifier: https://jspm.dev/npm:xlsx@0.17.5!cjs
    at https://jspm.dev/xlsx:5:25

I’m running a GitHub action to download images from an api every hour, I used the nasa image example as the template. However sometimes the run fails with this error, what could be the issue?

here’s the failed run:
https://github.com/weirdyang/causeway-image/actions/runs/1737018565
Here’s my post process script
https://github.com/weirdyang/causeway-image/blob/main/post-process.js

Activity

  1. irealva commented on Jan 24, 2022

    @irealva
    Contributor

    Hi there! Thanks for reporting this. Could you try upgrading your version of the postprocessing library to 0.0.13

    So here: https://github.com/weirdyang/causeway-image/blob/main/post-process.js#L4

    import { readImageFromURL, readJSON, writeImage } from 'https://deno.land/x/flat@0.0.13/mod.ts';

    And let us know if the error still happens for you?

  2. added a commit that references this issue on Jan 25, 2022
  3. weirdyang commented on Jan 25, 2022

    @weirdyang
    Author
  4. dalanmiller commented on Jan 30, 2022

    @dalanmiller
  5. Wattenberger commented on Jan 31, 2022

    @Wattenberger

    I did some digging here - looks like these errors are very intermittent and fail while downloading different modules required for the xlsx import from jspm.

    For example, this Action fails on https://jspm.dev/npm:@jspm/core@2/nodelibs/process
    https://github.com/weirdyang/causeway-image/runs/4997125928?check_suite_focus=true

    but this Action fails on https://jspm.dev/npm:@jspm/core@2/nodelibs/buffer
    https://github.com/weirdyang/causeway-image/runs/4998890994?check_suite_focus=true

    One other thing I noticed is that the errors appear to start ~Jan 10th, looking through the history on your repo, @dalanmiller. Looks like there was an xlsx release around the same time:

    image

    I pinned the xlsx import to v0.17.4
    https://deno.land/x/flat@0.0.14/src/xlsx.ts#L1

    I'm not positive that this will fix the error, but it might! Try bumping your flat import to 0.0.14, and we can revisit if the errors are still showing up.

  6. dalanmiller commented on Feb 1, 2022

    @dalanmiller

    Thanks for investigating @Wattenberger - I bumped to 0.0.14 and I'm still getting the same issue it seems.

    Has anything changed to the Deno runtime behind the scenes?

    https://github.com/dalanmiller/electricity/actions/runs/1775755781

    Edit:

    But oddly, it's intermittent, this recent run succeeded:
    https://github.com/dalanmiller/electricity/runs/5015504616?check_suite_focus=true

  7. weirdyang commented on Feb 1, 2022

    @weirdyang
    Author

    Thanks, will try and report back. Fwiw I noticed the examples are also failing intermittently https://github.com/githubocto/flat-demo-bitcoin-price/actions/runs/1778265780

  8. irealva commented on Feb 11, 2022

    @irealva
    Contributor

    Thanks, will try and report back. Fwiw I noticed the examples are also failing intermittently https://github.com/githubocto/flat-demo-bitcoin-price/actions/runs/1778265780

    This might have been because we hadn't updated the flat-demo-bitcoin-price to use 0.0.14 but we just did to see what happens.

  9. irealva commented on Feb 11, 2022

    @irealva
    Contributor

    Following-up @dalanmiller it doesn't seem like your action has failed in a while, is that correct ?https://github.com/dalanmiller/electricity/actions?

  10. irealva commented on Feb 11, 2022

    @irealva
    Contributor

    Also will leave a comment to follow this issue which Amelia found: SheetJS/sheetjs#2217

  11. weirdyang commented on Feb 11, 2022

    @weirdyang
    Author

    Just bumped to 14, fwiw didn’t get any errors the past few days with 13

  12. added a commit that references this issue on Feb 14, 2022
  13. andmos commented on Feb 14, 2022

    @andmos
    Contributor

    I had the some error all of a sudden, looks like a bump to 0.0.14 did the trick.

  14. Wattenberger commented on Feb 14, 2022

    @Wattenberger

    Thanks for the reports y'all! Looks like runs have stopped intermittently failing 🙌 Please let us know if it starts happening again, and hopefully we can stop using jsnpm for Sheetjs soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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