Giter Club home page Giter Club logo

Comments (7)

bitwalker avatar bitwalker commented on July 17, 2024 2

Is Node being used for something post-build? If that's the case, then yes, installing Node globally is the best approach. The reason why Node is not installed currently, is because it was (previously) only required during builds to generate front-end assets, so by the time the application was installed on the EC2 host, Node was no longer needed. If that's changed, the init.sh script will need to install Node along with the other packages it installs.

from blockscout-terraform.

KronicDeth avatar KronicDeth commented on July 17, 2024

:enoent is the Erlang form of ENOENT from Posix, so it means that the compile_solc.js isn't installed. Did you run the steps in the README to install the JS code for `apps/explorer?

from blockscout-terraform.

acravenho avatar acravenho commented on July 17, 2024

Yes, everything was run and it was working locally before the upload to AWS. Does :enoent need to be installed during the infra build?

from blockscout-terraform.

bitwalker avatar bitwalker commented on July 17, 2024

ENOENT (and the error tuple form in Erlang/Elixir :enoent) is just an error code which says that a given file descriptor doesn't exist (it would be translated something like "Error: no such file system entry"). For whatever reason, the that file can't be found on the host, so it either isn't being bundled into the source files uploaded to CodeDeploy, or is being removed somehow - I would suspect the former though.

from blockscout-terraform.

igorffs avatar igorffs commented on July 17, 2024

Is there a chance that this is happening due to missing user permissions?

from blockscout-terraform.

acravenho avatar acravenho commented on July 17, 2024

This file /opt/app/_build/prod/lib/explorer/priv/compile_solc.js exists so I'm having issues solving this issue still. I'll keep digging.

from blockscout-terraform.

amandasposito avatar amandasposito commented on July 17, 2024

cmd(command, args, opts \\ [])
command is expected to be an executable available in PATH unless an absolute path is given.

https://hexdocs.pm/elixir/System.html#cmd/3

The problem is that the System.cmd is not finding the node command:

[ec2-user@ip-10-0-0-245 explorer]$ node --v
-bash: node: command not found
[ec2-user@ip-10-0-0-245 explorer]$ iex -S mix
Erlang/OTP 20 [erts-9.3] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false]

Interactive Elixir (1.6.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> System.find_executable("node")
nil

There are two ways of fixing this:

  1. Install the node globally in the machine;
  2. Distribute it in priv and keep the executables in the project repository.

I'm thinking about going with the first option to solve this one, but I'm not sure how we will handle this dependency for the next deploys, maybe add some condition to the bin/deploy file as well.

WDYT @bitwalker ?

from blockscout-terraform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.