quarto-ext / fontawesome

Use Font Awesome icons in HTML and PDF documents.
MIT License
97 stars 11 forks source link

Issue deploying to netlify #22

Open DidDrog11 opened 1 year ago

DidDrog11 commented 1 year ago

Hi,

I imagine this is an issue I have produced but just in case. Does this error log mean anything to you?

6:08:43 PM: ──────────────────────────────────────────────────────────────── 6:08:43 PM: Plugin "@quarto/netlify-plugin-quarto" failed
6:08:43 PM: ──────────────────────────────────────────────────────────────── 6:08:43 PM: ​ 6:08:43 PM: Error message 6:08:43 PM: Error: Error message 6:08:43 PM: Command failed with exit code 1: /tmp/quarto/bin/quarto render (https://ntl.fyi/exit-code-1) 6:08:43 PM: [ 1/26] about.qmd 6:08:43 PM: Error running filter /tmp/quarto/share/filters/quarto-pre/quarto-pre.lua: 6:08:43 PM: _extensions/quarto-ext/fontawesome/fontawesome.lua:63: attempt to call a nil value (field 'is_format') 6:08:43 PM: stack traceback: 6:08:43 PM: /tmp/quarto/share/filters/quarto-pre/quarto-pre.lua:2943: in function 'callShortcodeHandler' 6:08:43 PM: /tmp/quarto/share/filters/quarto-pre/quarto-pre.lua:3024: in function 'transformShortcodeInlines'

It seems there is an error produced by the lua while running the extension and the traceback seems to relate to the shortcodes.

I am using the following code in the _quarto.yml to put fa icons in the navbar. Could that be the issue?

    left:
     - text: "{{< fa virus >}} Monkeypox"
        href: monkeypox.qmd
cscheid commented 1 year ago

Are you running a recent (v1.2 prerelease) version of quarto? IIRC, that error comes from using an old version of quarto.

DidDrog11 commented 1 year ago

Yes, I seem to be (after checking with quarto_version() and have tried again after updating. Works fine on rendering the website locally. Deploying from RStudio using quarto publish netlify also works fine.

It seems to be an issue on the netlify plugin quarto side of things rather than anything to do with fontawesome.

cscheid commented 1 year ago

It's strange, though, because by default, https://github.com/quarto-dev/netlify-plugin-quarto uses the latest release, which is v1.2.262.

dragonstyle commented 1 year ago

Latest release or latest prerelease?

cscheid commented 1 year ago

@dragonstyle .... oh 🤦 not the first time I get this wrong either. You're totally right.

@DidDrog11 try specifying the version directly through the version option, and set it to v1.2.267

DidDrog11 commented 1 year ago

As in

{ "dependencies": { "@quarto/netlify-plugin-quarto": "^1.2.267" } } In the package.json?

If so I get a different issue now.

10:12:29 AM: Installing NPM modules using NPM version 8.19.2 10:12:30 AM: npm ERR! code ETARGET 10:12:30 AM: npm ERR! notarget No matching version found for @quarto/netlify-plugin-quarto@^1.2.267. 10:12:30 AM: npm ERR! notarget In most cases you or one of your dependencies are requesting 10:12:30 AM: Creating deploy upload records 10:12:30 AM: npm ERR! notarget a package version that doesn't exist. 10:12:30 AM: npm ERR! A complete log of this run can be found in: 10:12:30 AM: npm ERR! /opt/buildhome/.npm/_logs/2022-11-08T18_12_29_662Z-debug-0.log 10:12:30 AM: Error during NPM install 10:12:30 AM: Build was terminated: Build script returned non-zero exit code: 1 10:12:30 AM: Failed during stage 'building site': Build script returned non-zero exit code: 1 (https://ntl.fyi/exit-code-1)

cscheid commented 1 year ago

no, that should be 0.0.5. I mean specifying options to the plugin itself in netlify.toml:

[[plugins]]
package = "@quarto/netlify-plugin-quarto"
version = "1.2.267"
DidDrog11 commented 1 year ago

It didn't seem to like that.


11:12:34 AM: Failed during stage 'Reading and parsing configuration files': 
When resolving config file /opt/build/repo/netlify.toml:
Configuration property plugins[0] has unknown properties. Valid properties are:
  - package
  - pinned_version
  - inputs

Invalid syntax

  [[plugins]]
  package = "@quarto/netlify-plugin-quarto"
  version = "1.2.267"
  origin = "config"

    [plugins.inputs]

Valid syntax

  [[plugins]]
  package = "netlify-plugin-one"

    [plugins.inputs]
    port = 80

: exit status 1
cscheid commented 1 year ago

Oh, I think I missed the [plugins.inputs] subsection. Too many different syntaxes we don't control. I'm sorry! :( Try this?

[[plugins]]
package = "@quarto/netlify-plugin-quarto"
  [plugins.inputs]
  version = "1.2.267"
DidDrog11 commented 1 year ago

No worries, I really appreciate the assistance.

This error seems even more opaque, I wouldn't know where to start.

11:22:59 AM: Installing missing commands 11:22:59 AM: Verify run directory 11:23:00 AM: ​ 11:23:00 AM: ──────────────────────────────────────────────────────────────── 11:23:00 AM: Netlify Build
11:23:00 AM: ──────────────────────────────────────────────────────────────── 11:23:00 AM: ​ 11:23:00 AM: ❯ Version 11:23:00 AM: @netlify/build 28.1.11 11:23:00 AM: ​ 11:23:00 AM: ❯ Flags 11:23:00 AM: baseRelDir: true 11:23:00 AM: buildId: 636aac6aa779b30008e0e4f5 11:23:00 AM: deployId: 636aac6aa779b30008e0e4f7 11:23:00 AM: ​ 11:23:00 AM: ❯ Current directory 11:23:00 AM: /opt/build/repo 11:23:00 AM: ​ 11:23:00 AM: ❯ Config file 11:23:00 AM: /opt/build/repo/netlify.toml 11:23:00 AM: ​ 11:23:00 AM: ❯ Context 11:23:00 AM: production 11:23:01 AM: ​ 11:23:01 AM: ❯ Loading plugins 11:23:01 AM: - @quarto/netlify-plugin-quarto@0.0.5 from netlify.toml and package.json 11:23:02 AM: ​ 11:23:02 AM: ──────────────────────────────────────────────────────────────── 11:23:02 AM: 1. @quarto/netlify-plugin-quarto (onPreBuild event)
11:23:02 AM: ──────────────────────────────────────────────────────────────── 11:23:02 AM: ​ 11:23:02 AM: ​ 11:23:02 AM: ──────────────────────────────────────────────────────────────── 11:23:02 AM: Plugin "@quarto/netlify-plugin-quarto" internal error
11:23:02 AM: ──────────────────────────────────────────────────────────────── 11:23:02 AM: ​ 11:23:02 AM: Error message 11:23:02 AM: Error: function () { [native code] } could not be cloned. 11:23:02 AM: ​ 11:23:02 AM: Plugin details 11:23:02 AM: Package: @quarto/netlify-plugin-quarto 11:23:02 AM: Version: 0.0.5 11:23:02 AM: Repository: git+https://github.com/quarto-dev/netlify-plugin-quarto.git 11:23:02 AM: npm link: https://www.npmjs.com/package/@quarto/netlify-plugin-quarto 11:23:02 AM: Report issues: https://github.com/quarto-dev/netlify-plugin-quarto/issues 11:23:02 AM: ​ 11:23:02 AM: Error location 11:23:02 AM: In "onPreBuild" event in "@quarto/netlify-plugin-quarto" from netlify.toml and package.json 11:23:02 AM: at writeChannelMessage (node:internal/child_process/serialization:109:9) 11:23:02 AM: at process.target._send (node:internal/child_process:847:17) 11:23:02 AM: at process.target.send (node:internal/child_process:747:19) 11:23:02 AM: at node:internal/util:364:7 11:23:02 AM: at new Promise () 11:23:02 AM: at bound (node:internal/util:350:12) 11:23:02 AM: at sendEventToParent (file:///opt/buildhome/node-deps/node_modules/@netlify/build/lib/plugins/ipc.js:102:48) 11:23:02 AM: at handleError (file:///opt/buildhome/node-deps/node_modules/@netlify/build/lib/plugins/child/error.js:11:11) 11:23:02 AM: at handleEvent (file:///opt/buildhome/node-deps/node_modules/@netlify/build/lib/plugins/child/main.js:33:15) 11:23:02 AM: at processTicksAndRejections (node:internal/process/task_queues:96:5) 11:23:02 AM: ​ 11:23:02 AM: Resolved config 11:23:02 AM: build: 11:23:04 AM: Creating deploy upload records 11:23:02 AM: environment: 11:23:02 AM: - NETLIFY_GRAPH_TOKEN 11:23:02 AM: - ONEGRAPH_AUTHLIFY_TOKEN 11:23:02 AM: publish: /opt/build/repo/_site 11:23:04 AM: Failed during stage 'building site': Build script returned non-zero exit code: 3 (https://ntl.fyi/exit-code-3) 11:23:02 AM: publishOrigin: ui 11:23:02 AM: plugins: 11:23:02 AM: - inputs: {} 11:23:02 AM: origin: config 11:23:02 AM: package: '@quarto/netlify-plugin-quarto'

cscheid commented 1 year ago

... sigh. I was afraid this might come up. Now you're getting caught by a bug somewhere in netlify's own code that we have wrestled with for a couple of months and haven't been able to track down (we're in touch with their engineers and haven't been able to figure this out). I'm going to spend some time this week on this and hopefully we'll be able to get to the bottom of it. I'm sorry!

cscheid commented 1 year ago

You're seeing this: https://github.com/quarto-dev/quarto-cli/issues/1956

DidDrog11 commented 1 year ago

Thanks for your help. For me it's absolutely fine to just publish from RStudio.