Getting error Could not compile dependency :mimerl - compilation

(Mix) Could not compile dependency :mimerl, "/home/ubuntu/.mix/rebar3
bare compile --paths "/var/www/qserv/elixirbackend/_build/dev/lib/*/ebin""
command failed. You can recompile this dependency with "mix deps.compile mimerl",
update it with "mix deps.update mimerl" or clean it with "mix deps.clean mimerl"
I am getting this error on my server. Everything was working perfectly fine but after restarting my server, started facing the above mentioned issue.
Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:10] [hipe] [kernel-poll:false]
Elixir 1.6.3 (compiled with OTP 19)

I followed the instructions mentioned by Elixir forum user
ubuntu#ip-172-31-27-178:/var/www/qserv/elixir-backend$ sudo rm -rf /home/ubuntu/.mix/rebar3
ubuntu#ip-172-31-27-178:/var/www/qserv/elixir-backend$ mix local.rebar --force
and Then I also changed git permissions which I noticed while running mix phx.server
warning: unable to access ‘/home/ubuntu/.config/git/ignore’: Permission denied
warning: unable to access ‘/home/ubuntu/.config/git/attributes’: Permission denied
So, basically the problem was somehow I messed up permissions(I dont remember/know exactly how).
Credit goes to Norbert Melzer elixir forum user(Complete post).

Related

`npm install` issues/failure with expo-cli and react-native-app

I really need some help with what seems to be the most basic task (setting up the expo/react-native project). I've installed the expo-cli (v3.11.7), react-native (v2.0.1), watchman (v4.9.0) and node (v12.14.1). I've followed the tutorial up until the point where I need to run expo start and I get the following error:
Your project is in SDK version >= 33.0.0, but the expo package version seems to be older.
Error: node_modules directory is missing. Please run npm install in your project directory.
Couldn't start project. Please fix the errors and restart the project.
Set EXPO_DEBUG=true in your env to view the stack trace.
I've then run npm install and tried again but the same error pops up. I've removed the node_modules folder and that didn't work either.
Update:
When I npm install this is the error I'm seeing:
npm WARN deprecated core-js#1.2.7: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm ERR! code EPROTO
npm ERR! errno EPROTO
npm ERR! request to https://codeload.github.com/expo/react-native/tar.gz/sdk-36.0.0 failed, reason: write EPROTO 4521895360:error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1544:SSL alert number 40
I've installed yarn (v1.21.1) and tried installing using this with the same error:
warning expo > fbemitter > fbjs > core-js#1.2.7: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
error An unexpected error occurred: "https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz: write EPROTO 4356277696:error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1544:SSL alert number 40
Can anyone advise?
I've managed to solve the problem. I was trying to install over my home network, which apparently has some proxy restrictions! No idea why.
Someone advised me to try again but connected to another network or my mobile hotspot. I tried this and it worked! Problem solved. So I guess for any others that may be experiencing the same problem, try connecting to another network and see if that helps.
If this fails, then I suppose looking at the proxy configuration and making changes there may help. But I wouldn't advise doing this unless you know exactly what you're doing.

Phoenix: Running mix ecto.create Error Compiling Ranch Dependency

I'm trying to go through the Up And Running tutorial on the Phoenix framework site. I have the following setup :
macOS 10.14.5
Phoenix 1.4.6
Elixir 1.8.2
Erlang/OTP 22
I create the project with the mix phx.new command. I get prompted to fetch and install the dependencies. I type Y. The dependencies get fetched and installed successfully.
I go to my project directory and enter the following command :
mix ecto.create
The following error appears :
(Mix) Could not compile dependency :ranch, "/Volumes/Macintosh HD/Users/mark/.mix/rebar3 bare compile --paths "/Code/hello/_build/dev/lib/*/ebin"" command failed.
You can recompile this dependency with "mix deps.compile ranch", update it with "mix deps.update ranch" or clean it with "mix deps.clean ranch"
I get the same error if I run mix phx.server.
If I run mix deps.clean ranch and mix deps.update ranch, it lists the following unchanged dependencies:
Resolving Hex dependencies...
Dependency resolution completed:
Unchanged:
connection 1.0.4
cowboy 2.6.3
cowlib 2.7.3
db_connection 2.0.6
decimal 1.7.0
ecto 3.1.4
ecto_sql 3.1.3
file_system 0.2.7
gettext 0.16.1
jason 1.1.2
mime 1.3.1
phoenix 1.4.6
phoenix_ecto 4.0.0
phoenix_html 2.13.2
phoenix_live_reload 1.2.0
phoenix_pubsub 1.1.2
plug 1.8.0
plug_cowboy 2.0.2
plug_crypto 1.0.0
postgrex 0.14.3
ranch 1.7.1
telemetry 0.4.0
So ranch has been compiled. But when I run mix ecto.create again, I get the same error about being unable to compile dependency :ranch.
I did an Internet search to see if anyone else had the same issue. Every issue someone had with mix ecto.create involved creating database users. No one else had an issue with ranch.
What do I have to do to get the Up and Running tutorial running properly?
I've run into this problem under Ubuntu, and the issue was that the ~/.configure folder was unreadable by my current user. Changing the owner and group on that folder and it's contents solved the problem for us.
I was able to recreate this problem under MacOS, using Elixir 1.7.4 and Erlang 20.1 by changing the permissions on my ~/.config folder to 600. Setting the permissions back to 755 allowed the compile.

How to deploy Elm and Phoenix Elixir to 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.

Phoenix setup failing due to space in filepath

I'm trying to set up the demo Phoenix project and I can't get past the step where I run mix ecto.create.
This is the error I get:
sh: /Volumes/1: No such file or directory
** (Mix) Could not compile dependency :fs, "/Volumes/1 TB HDD WD/Users/__USERNAME__/.mix/rebar compile skip_deps=true deps_dir="/Volumes/1 TB HDD WD/Users/__USERNAME__/.../hello_phoenix/_build/dev/lib"" command failed. You can recompile this dependency with "mix deps.compile fs", update it with "mix deps.update fs" or clean it with "mix deps.clean fs"
It really looks like it's because of the spaces in my hard drive name, but I'm not sure how to fix it.

"cannot find module" when installing npm modules on windows

I am new to NodeJS. I am trying to use npm on Windows 8.
I have installed using chocolatey, cinst nodejs.install (version 0.10.17). I installed as administrator (and would prefer to run npm as a normal user).
Node itself seems to be working, I can use the REPL to run simple programs.
If I try to install something using npm, I get cannot find module:
> node npm install express
module.js:340
throw err;
^
Error: Cannot find module 'C:\Users\Klas\Documents\My Dropbox\mina egna\tech\node\webserver\npm'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3
I have read the answers on Nodejs cannot find installed module on Windows? but unfortunately it is still unclear to me what I have to do.
I have tried setting NODE_PATH:
In trying to follow this answer, I have tried setting it to C:\Users\Klas\AppData\Roaming\npm\node_modules (but I had to create both the npm and the subfolder node_modules myself)
I have tried creating a folder c:\node\node_module (according to this advice, even though the installation did not even create a c:\node folder) and setting it to that.
I have tried setting it to C:\Program Files\nodejs\node_modules\npm\node_modules (which did exist after installation)
I have also tried to create a node_modules folder below the current working directory. As I understand it that is where local npm will be installed?
None of these helped. So it seems to me that setting NODE_PATH is not the solution?
Using the -g flag makes no difference (I would prefer not to use it).
I get the same error both as normal user and as administrator (I would prefer to be a normal user).
I get the same error no matter where I execute the command, except when I do it in C:\Program Files\nodejs, where I get
basedir=`dirname "$0"`
^
SyntaxError: Unexpected token ILLEGAL
at Module._compile (module.js:439:25)
Not using windows, but I'm pretty sure it's just npm install express on windows too.

Resources