Giter Club home page Giter Club logo

network-data-api's People

Contributors

nick-verida avatar tahpot avatar

Watchers

 avatar  avatar  avatar  avatar

network-data-api's Issues

App cannot be deployed from MacOS

Currently deploying this app from MacOS doen't work, because we get this when deployed:

"/var/task/node_modules/leveldown/build/Release/leveldown.node: invalid ELF header",

This is because leveldown is build on Mac but deployed on Linux.

Adding this to serverless.xml should work but has stopped for some reason:

  webpack:
    includeModules: true
    packagerOptions:
      scripts:
        - npm_config_platform=linux npm_config_arch=x64 yarn add leveldown

Currently I'm deploy via a docker build. This was non-trivial, but a few notes:

On the Mac, rm -rf node_modules to make sure we get rid of Mac versions

# run docker mapping the path things are checkout out at to a `/working` directory inside docker
docker run -v ~/dev/verida/network-data-api:/working -it --rm ubuntu

# Now we are in docker (Ubuntu)
apt update
apt install unzip nodejs npm curl
cd /root

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"


curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip" # NOTE the ARM version is needed!
unzip awscliv2.zip
./aws/install

cd /working
nvm install # install and use the correct node version
nvm use
/usr/local/bin/aws configure # add the AWS deployment keys
npm install --global yarn
yarn # do the build
yarn deploy-prod # deploy!

API failures

We are getting

{"message":"Error: Failed to get number of active DIDs","status":"fail"}

I added some logging and see the following when running locally:

Error: Failed to get number of active DIDs
    at /Users/nlothian/dev/verida/network-data-api/node_modules/@verida/vda-did-resolver/dist/activeDIDCount.js:74:27
    at step (/Users/nlothian/dev/verida/network-data-api/node_modules/@verida/vda-did-resolver/dist/activeDIDCount.js:33:23)
    at Object.throw (/Users/nlothian/dev/verida/network-data-api/node_modules/@verida/vda-did-resolver/dist/activeDIDCount.js:14:53)
    at rejected (/Users/nlothian/dev/verida/network-data-api/node_modules/@verida/vda-did-resolver/dist/activeDIDCount.js:6:65)

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.