kriasoft/graphql-starter-kit

napi and sodium integration issue

andrewkslv opened this issue · 2 comments

New project from master generates error on yarn install on osx

nodejs-api-starter/node_modules/node-addon-api/napi.h:6:10: fatal error: 'initializer_list' file not found
#include <initializer_list>

If I add missing config into binding.gyp

      "defines": ["NAPI_CPP_EXCEPTIONS"],
      "xcode_settings": {
        "GCC_ENABLE_CPP_EXCEPTIONS": "YES",
        "CLANG_CXX_LIBRARY": "libc++",
        "MACOSX_DEPLOYMENT_TARGET": "10.7",
      },
      "msvs_settings": {
        "VCCLCompilerTool": { "ExceptionHandling": 1 },
      },

It still requires missing module

/src/utils/password_hash.cc:2:10: fatal error: 'sodium.h' file not found

@eclipticwld it's better to run yarn install from under the Doker container:

$ docker-compose run --rm --no-deps api yarn install

@koistya I see. Thank you.