How to deploy Elm and Phoenix Elixir to Heroku? - heroku

When trying to deploy a Phoenix/Elm project to Heroku I run into the following issue:
Running default compile
Elm compile: Main.elm, in web/elm, to ../static/vendor/main.js
/bin/sh: 1: elm: not found
17 Jul 15:58:21 - error: Compiling of web/elm/Main.elm failed. Command failed: elm make --yes --output ../static/vendor/main.js Main.elm
/bin/sh: 1: elm: not found
Check your digested files at "priv/static"
I'm using the buildpacks for Phoenix found in the guides and brunch/elm-brunch.

The error is caused by the elm binaries not being installed. One way to install elm is by using npm, which is already available as the Phoenix buildpack uses it.
Solution: Add elm as a dependency in package.json. This will cause the Phoenix buildpack to install elm before executing the brunch script.
Note that a local computer may have a separate installation of the elm binaries, potentially causing confusion. As long as versions match, this ought not be a problem. Note that to use the elm binaries installed by npm above, one has to include ./node_modules/.bin in ones PATH (which the phoenix buildpack does). E.g. if one has a separate elm installation which is included in PATH since before, this will be used when running commands from the prompt.

Related

Can't properly install hardhat using Powershell! Persistent Error HH12: Trying to use a non-local installation of Hardhat, which is not supported

Below is a short list of my setup until I stumble upon the HH12 Hardhat Error that I keep getting:
mkdir wave (Name of my directory)
cd wave
npm init -y
npm install —save-dev hardhat
npx hardhat
Choose sample project
6a. Hardhat project root (Select)
6b. Add .gitignore
Say yes to everything
install the remaining dependencies: npm install --save-dev #nomiclabs/hardhat-waffle ethereum-waffle chai #nomiclabs/hardhat-ethers ethers
npx hardhat accounts (to see all the different accounts)...
...And then it fails here! An HH12 Hardhat Error Message: "Hardhat is not installed or installed globally. You tried to run Hardhat from a global installation or not installing it at all. This is not supported. Please install Hardhat locally using npm or Yarn, and try again." (https://hardhat.org/errors/) [BTW, these 2 lines are the ONLY docs on this error on Hardhat!].
Any suggestions?
I have tried the following possible 'fixes' to sidestep this error but to no avail:
Updating most current version of node
Restarting my PC (About 17 X now as of this writing)
Using GitBash (Instead of Powershell)
Asking mods in Hardhat Discord (None) and other Discords
Opening the Hardhat docs (And the Tutorials!!) for answers... None!
StackExchange - There's literally only 1 other person who ALSO had this problem here! But the answers here are not the solution. (Have DMd that person but no reply as of yet).
So can anyone out there help?
I believe I finally figured out the solution (at least what worked for me):
I dropped back 2 directory levels from where I was for my root project and started again there.
I updated my Node version to 16.

Getting error: no matching version `^2.0.0` found for package `codec`?

Question
I'm new to Substrate and going through Add a Pallet to Your Runtime. At first, running the command cargo check -p node-template-runtime gave me error
error: failed to parse manifest at `/Users/bashar/work/substrate/start/substrate-node-template/pallets/template/Cargo.toml`
Caused by:
feature `rename-dependency` is required
consider adding `cargo-features = ["rename-dependency"]` to the manifest
I added it and then I started getting this error:
error: no matching version `^2.0.0` found for package `codec`
location searched: registry `https://github.com/rust-lang/crates.io-index`
versions found: 0.0.0
required by package `frame-benchmarking-cli v3.0.0`
... which is depended on by `node-template v3.0.0 (/Users/bashar/work/substrate/start/substrate-node-template/node)`
I tried modifying the codec version to 2.0.1 with no luck. My setup
rustup 1.23.1
rustc 1.50.0
cargo 1.30.0
Any idea what I'm doing wrong?
UPDATE
I went back to the Create Your First Substrate Chain, which this tutorial is built on, started from scratch, which the Pallet tutorial is based on. And this time, after cloning the repository for first tutorial, cargo build --release failed with the same error feature rename-dependency is required.
This built fine the first time before I moved to the second tutorial. Which makes me think maybe a recent Mac update ruined something? I even tried uninstalling Rust and re-installing it, then installing a new template. Same thing

Titanium SDK zip package is not being generated

I downloaded the Titanium SDK and followed the steps to locally build it from here.
According to the guide, they changed the way to build the SDK to the one listed in here.
But when I try to perform the build like this:
node scons.js build --android-ndk c:\Android\android-ndk-r9
--android-sdk c:\Android\SDK
The console shows the following lines of text:
Building MobileSDK version 6.1.0, githash 591555a You don't seem to
have the appropriate thirdparty files. I'll fetch them. This could
take awhile.. Might want to grab a cup of Joe or make fun of Nolan.
Downloading
http://timobile.appcelerator.com.s3.amazonaws.com/libTiCore-24.a.gz
100% [========================================] 0.0s
Gunzipping C:\Users\AGUSTN~1\AppData\Local\Temp\117215-10132-d88fho.gz
to C:\Titanium\titanium_mobile\iphone\lib\libTiCore.a
And it stops there, when I go check the dist folder no zip is found.
Why is the zip not being generated and no error being thrown?
I have the following enviroment variables set:
ANDROID_SDK
ANDROID_NDK
PATH with the paths to THE BINARIES for NPM (3.83), Node.js (5.10.1),
git (2.8.1.windows.1), Python (2.7.13), Java (8 rev 77), Ant (1.9.7),
gperf (3.0.1), $ANDORID_SDK/platform-tools and $ANDROID_SDK/tools
JAVA_HOME (Java 8 rev 77)
ANDROID_PLATFORM (set to 17)
GOOGLE_APIS (set to 23)
Why is the SDK not being packaged?
Install the node tools titanium and appc with:
npm install titanium appc -g
in order to compile the SDK

cannot execute binary file of golang bootstrap installer

I'm using the instructions in this blog post, which is intended for installing go 1.5 on the Raspberry Pi, to install golang on my Chromebook (which has ChrUbuntu not Chromium installed). The technique recommended in the blog post is to install a Golang 1.4 bootstrap compiler available here and then use that to build golang 1.5 (as you need a version of go installed to build 1.5). I tried this on the Raspberry pi and it worked, but when I ran this command from /go/src on ChrUbuntu
env GO_TEST_TIMEOUT_SCALE=10 GOROOT_BOOTSTRAP=$HOME/go-linux-arm-bootstrap ./all.bash
It gave me this output
env GO_TEST_TIMEOUT_SCALE=10 GOROOT_BOOTSTRAP=$HOME/go-linux-arm-bootstrap ./all.bash
# Building C bootstrap tool.
cmd/dist
./make.bash: line 121: /home/user/go-linux-arm/bootstrap/bin/go cannot execute binary file
Why am I getting this error message (is it because it's not compatible with ChrUbuntu) and how to do what I am trying to do. Thank you in advance.

Error -60005 when install Cocos2d-iPhone v3 RC4

When I try to install Cocos2d-iphone 3.0.0 RC4, I got an error: (run without sudo)
Error -60005 occurred while executing script with privileges.
So, I try to show its package content and use terminal to do: cd ...Cocos2D Installer 3.0.0.app/Contents/MacOS
I try this command: (with sudo)
sudo ./Cocos2D\ Installer\ 3.0.0
It works but I got log with some errors:
[1m>>> Installing Cocos2D-v3.0.0 files (B[m
[1m>>> Installing Cocos2D-v3.0.0 templates (B[m
[4m[1mCocos2D Template Installer (Cocos2D-v3.0.0)(B[m
Error: [31m✖︎(B[m Script cannot be executed as root.
In order for it to work properly, please execute the script again without 'sudo'.
If you want to know more about how to use this script execute '/Users/viethung/Downloads/Cocos2D-v3.0.0/install.sh --help'.
[1m>>> Building/Installing Cocos2D-v3.0.0 documentation, this may take a minute.... (B[m
appledoc version: 2.2 (build 963)
Generation step 4/5 failed: GBDocSetInstallGenerator failed generating output, aborting!
Documentation set was installed, but couldn't reload documentation within Xcode.
Xcode got an error: No documentation set present at specified path.
[1m>>> Cocos2D-v3.0.0 installation complete! (B[m
Are there any way is better than this way?
I have same problem.
I think you installed old cocos2d-iphone and it caused this problem.
You should remove old cocos2d-iphone first. I removed:
~/Library/Developer/Xcode/cocos2d v3.x
And install again. It works for me.
Hope it works for you :)

Resources