Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

I'm very new to Actions, so forgive me if this is dumb. I've got Flat Data properly grabbing my JSON and I'm working on the postprocessing.

First off - there is no way to test locally... right?

Second, I'm modifying the example given for the BTC demo, so far I only have this:

import { readJSON, writeJSON, removeFile } from 'https://deno.land/x/flat@0.0.10/mod.ts' 

const filename = Deno.args[0];
const json = await readJSON(filename);
console.log(json);

When I manually run the action, I get:

Error: Command failed: deno run -q --allow-read --allow-write --allow-run --allow-net --allow-env --unstable ./fixweather.js _data/weather.json
�[0m�[33mWarning�[0m Implicitly using latest version (1.0.0) for https://deno.land/x/url_join/mod.ts
�[0m�[1m�[31merror�[0m: Relative import path "ssf" not prefixed with / or ./ or ../ from "https://cdn.deno.land/sheetjs/versions/v0.16.8/raw/types/index.d.ts"

This looks to be an error in something related to sheetjs. I also thought maybe the issue was my postprocess file being ./fixweather.js. When I changed this to fixweather.js, I got a new, but similar error:

Error: Command failed: deno run -q --allow-read --allow-write --allow-run --allow-net --allow-env --unstable fixweather.js _data/weather.json
�[0m�[33mWarning�[0m Implicitly using latest version (1.0.0) for https://deno.land/x/url_join/mod.ts
�[0m�[1m�[31merror�[0m: Relative import path "cfb" not prefixed with / or ./ or ../ from "https://cdn.deno.land/sheetjs/versions/v0.16.8/raw/types/index.d.ts"

Repo is here: https://github.com/cfjedimaster/eleventy_flat_data

Edit 6/29/2021: Got deno installed locally, ran the same command GitHub is, and I get the same error. So it's got to be something dumb on my part. :)

You must be logged in to vote

Hi there! No dumb questions, thanks for posting this.

  1. To your first question. Yes, you can test the Actions (somewhat) locally and the Deno script locally. The Deno script is a bit easier to test locally, you can try to:
  • Install Deno locally on your computer (https://deno.land/manual/getting_started/installation)
  • Create a file with your local script fixweather.js and replace Deno.args[0]; with just the name of a local file
  • Run something like deno run -q --allow-read --allow-write --allow-run --allow-net --allow-env --unstable fixweather.js

With GitHub Actions, you can use the command line to trigger workflow runs but you can't fully simulate it locally. There are two approaches:

  • Use …

Replies: 1 comment

Comment options

Hi there! No dumb questions, thanks for posting this.

  1. To your first question. Yes, you can test the Actions (somewhat) locally and the Deno script locally. The Deno script is a bit easier to test locally, you can try to:
  • Install Deno locally on your computer (https://deno.land/manual/getting_started/installation)
  • Create a file with your local script fixweather.js and replace Deno.args[0]; with just the name of a local file
  • Run something like deno run -q --allow-read --allow-write --allow-run --allow-net --allow-env --unstable fixweather.js

With GitHub Actions, you can use the command line to trigger workflow runs but you can't fully simulate it locally. There are two approaches:

  1. To your second question. You can solve the error by upgrading the Flat library to https://deno.land/x/flat@0.0.11/mod.ts in your fixweather.js file.
    More info at Relative import path "ssf" not prefixed with / or ./ or ../ #45 and Error when running githubocto/flat@v2: Relative import path "ssf" not prefixed with / or ./ or ../ from "https://cdn.deno.land/sheetjs/versions/v0.16.8/raw/types/index.d.ts" #47.
You must be logged in to vote
0 replies
Answer selected by irealva
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.