seed-rs / seed-quickstart-webpack

Template for web apps with Seed (Rust framework), TailwindCSS and Webpack.
https://quickstart-webpack.seed-rs.org
Other
111 stars 13 forks source link

Publish via netlify error #6

Closed rebo closed 5 years ago

rebo commented 5 years ago

Hi on a fork of this repo when I try to publish to netlify the build fails with:

2:31:30 AM: + 2 hidden modules 2:31:32 AM: 🧐 Checking for wasm-pack... 2:31:32 AM: ℹ️ Installing wasm-pack 2:31:32 AM: Error: spawn cargo ENOENT 2:31:32 AM: at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)

I am using "yarn build:release" for the build command and "dist" for the site location

When you were deploying did you ever get this issue?

MartinKavik commented 5 years ago

When you were deploying did you ever get this issue?

No.

  1. Are there any other errors or warnings before this one in the log? I have often problems with Travis - e.g. there is a problem with internet access and it fails while downloading dependencies, which can cause your issue if cargo isn't fully installed.

  2. There can be some problems with $PATH.

  3. Try to add something like this into your .travis.yml:

    where cargo
    echo $PATH

FYI, I'm migrating all projects to GitHub Action (or Azure Pipelines if there will be some blockers) so I'll probably write a guide for GA to seed-quickstart-webpack's readme. And I'll encounter the same problem as you if the problem isn't caused by Travis.

rebo commented 5 years ago

Thanks Martin I'll check it when I'm next back at my laptop and let you know.

MartinKavik commented 5 years ago

FYI I've configured Github Actions for Seed's homepage (repository is based on seed-quickstart-webpack with some changes) - main.yml - you can copy/paste it if you want. It works great and I haven't seen any errors like you described in this issue.

rebo commented 5 years ago

Hi Martin,

I've got it working now using github actions and your main.yaml file.

Many thanks

Charles-Johnson commented 4 years ago

I'm still getting the same error message even if I use Seed's homepage's main.yaml. Source code of my site. I have configured GitHub actions as per the README.

Charles-Johnson commented 4 years ago

I ran echo $PATH and it printed

/opt/buildhome/.wasmer/bin:
/opt/buildhome/.wasmer/globals/wapm_packages/.bin:
/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:
/opt/build/repo/node_modules/.bin:
/opt/build/cache/yarn/bin:
/opt/buildhome/.rvm/gems/ruby-2.6.2/bin:
/opt/buildhome/.rvm/gems/ruby-2.6.2@global/bin:
/opt/buildhome/.rvm/rubies/ruby-2.6.2/bin:
/opt/buildhome/.rvm/bin:
/opt/buildhome/.nvm/versions/node/v10.18.1/bin:
/opt/buildhome/python2.7/bin:
/opt/buildhome/.php:
/opt/buildhome/.binrc/bin:
/usr/local/rvm/bin:
/usr/local/sbin:
/usr/local/bin:
/usr/sbin:
/usr/bin:
/sbin:
/bin:
/opt/buildhome/.cask/bin:
/opt/buildhome/.gimme/bin:
/opt/buildhome/.dotnet/tools:
/opt/buildhome/.dotnet
MartinKavik commented 4 years ago

@Charles-Johnson I'm looking at the actions in your repo:


  1. Run - there are errors like
    error: this method could have a `#[must_use]` attribute

    New Rust version (= clippy version) has a new aggressive lint must_use_candidate which causes such errors. Just add line

    #![allow(clippy::must_use_candidate)]

    to your lib.rs. I didn't have time to fix it in the quickstart. If it helps, please create a PR.


  1. Run - has the broken main.yml file. Reverting changes in this commit should help.

I don't see error like the original one in this issue - could you point me to it, if it exists?

MartinKavik commented 4 years ago

@Charles-Johnson Note: Update your local Rust (rustup update) and run command cargo make verify in crate directory in your fork before push to make sure, that everything works and linter is happy.

Charles-Johnson commented 4 years ago

@MartinKavik thank you for the help. I will try those steps.

Charles-Johnson commented 4 years ago

@MartinKavik I was able to install wasm-pack. I should have just setup GitHub Actions first before trying to deploy directly through Netlify.