Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up HEIC plate extraction by using sharp to convert to JPEG #266

Open
wants to merge 26 commits into
base: main
Choose a base branch
from

Conversation

josephfrazier
Copy link
Owner

@josephfrazier josephfrazier commented Feb 11, 2021

This drops the extra latency from 6 seconds down to 1. However, it requires
libheif and libvips to be installed, so I need to figure out how to do
that on Heroku before this can be merged. On MacOS, this made it work
(see lovell/sharp#2004 (comment)):

brew install libheif
brew install libvips
yarn remove sharp && yarn add sharp

Perhaps https://github.com/brandoncc/heroku-buildpack-vips, see also https://gist.github.com/bigtiger/be41fffcd103d7e98c5fe4fdff0af3f9

Fixes #265:

See #264:

This adds about 6 seconds of latency since heic-convert is written in
JS, but it's better than nothing. Maybe I can get sharp working at
some point.
Fixes #263:

Here's a test image share.icloud.com/photos/0-5_Dy6WhkGw_7G-mlzadci-w#New_York
I suspect openalpr doesn't support HEIC, and we might need to convert to JPG on the server before sending to openalpr, see lovell/sharp#2004
If we can't get sharp working, try npmjs.com/package/heic-convert

…nalpr

This adds about 6 seconds of latency since `heic-convert` is written in
JS, but it's better than nothing. Maybe I can get `sharp` working at
some point.

Fixes #263
This drops the latency from 6 seconds down to 1. However, it requires
libheif and libvips to be installed, so I need to figure out how to do
that on Heroku before this can be merged. On MacOS, this made it work
(see lovell/sharp#2004 (comment)):

```
brew install libheif
brew install libvips
yarn remove sharp && yarn add sharp
```

Fixes #265:

> See #264:
>
> > This adds about 6 seconds of latency since `heic-convert` is written in
> > JS, but it's better than nothing. Maybe I can get `sharp` working at
> > some point.
> > Fixes #263:
> > > Here's a test image [share.icloud.com/photos/0-5_Dy6WhkGw_7G-mlzadci-w#New_York](https://share.icloud.com/photos/0-5_Dy6WhkGw_7G-mlzadci-w#New_York)
> > > I suspect openalpr doesn't support HEIC, and we might need to convert to JPG on the server before sending to openalpr, see [lovell/sharp#2004](lovell/sharp#2004)
> > > If we can't get sharp working, try [npmjs.com/package/heic-convert](https://www.npmjs.com/package/heic-convert)
@josephfrazier
Copy link
Owner Author

josephfrazier commented Feb 13, 2021

this would fix #271

EDIT: confirmed this reduces memory usage:

rss 125.78 MB
heapTotal 83.01 MB
heapUsed 51 MB
external 4.72 MB
arrayBuffers 1.5 MB
{
  error: TypeError: Cannot read property 'address_components' of undefined
      at H (/Users/josephfrazier/workspace/reported-web/src/geoclient.js:34:28)
      at process.r (internal/process/task_queues.js:93:5)
      at /Users/josephfrazier/workspace/reported-web/src/geoclient.js:110:5
}
heicConvert: 725.688ms
rss 276.89 MB
heapTotal 83.01 MB
heapUsed 51.31 MB
external 5.55 MB
arrayBuffers 1.5 MB

@josephfrazier josephfrazier temporarily deployed to github-heic-openalpr-fzqyxf7wa February 13, 2021 22:30 Inactive
@josephfrazier
Copy link
Owner Author

Looks like https://heictojpg.com/ can also convert while preserving EXIF metadata:

image

@josephfrazier josephfrazier temporarily deployed to github-heic-openalpr-fzqyxf7wa February 14, 2021 00:27 Inactive
@josephfrazier josephfrazier temporarily deployed to github-heic-openalpr-fzqyxf7wa February 14, 2021 01:52 Inactive
@josephfrazier
Copy link
Owner Author

mm, still no good:

2021-02-14T02:01:03.867602+00:00 app[web.1]: could not convert file from heic to jpg
2021-02-14T02:01:03.876707+00:00 app[web.1]: [Error: source: bad seek to 535484
2021-02-14T02:01:03.876710+00:00 app[web.1]: heif: Unsupported feature: Unsupported codec (4.3000)

Base automatically changed from master to main March 12, 2021 02:01
@josephfrazier josephfrazier marked this pull request as ready for review November 28, 2021 02:35
@josephfrazier
Copy link
Owner Author

josephfrazier commented Nov 28, 2021

next up is getting heroku to make a review app so I can test it there, once I find a HEIC file again

image

@josephfrazier josephfrazier temporarily deployed to reported-web-heic-opena-iv5cad November 28, 2021 02:51 Inactive
@josephfrazier
Copy link
Owner Author

I kicked off the review app build manually at https://dashboard.heroku.com/pipelines/cbc31c26-1c82-4965-91c0-8e311d3fa64b/app-setup/00ef2335-f0e6-4746-ba1e-95c2cfeca261, but it failed:

-----> Building on the Heroku-20 stack
-----> Using buildpacks:
       1. heroku-community/apt
       2. https://github.com/brandoncc/heroku-buildpack-vips
       3. heroku/nodejs
       4. jontewks/puppeteer
-----> Apt app detected
-----> Detected Aptfile or Stack changes, flushing cache
-----> Updating apt caches
       Get:1 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
       Get:2 http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease [86.6 kB]
       Get:3 http://archive.ubuntu.com/ubuntu focal-security InRelease [114 kB]
       Get:4 http://apt.postgresql.org/pub/repos/apt focal-pgdg/main amd64 Packages [356 kB]
       Get:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
       Get:6 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [1,275 kB]
       Get:7 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [11.3 MB]
       Get:8 http://archive.ubuntu.com/ubuntu focal-security/main amd64 Packages [1,281 kB]
       Get:9 http://archive.ubuntu.com/ubuntu focal-security/universe amd64 Packages [821 kB]
       Get:10 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1,098 kB]
       Get:11 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,692 kB]
       Fetched 18.4 MB in 2s (8,824 kB/s)
       Reading package lists...
-----> Fetching .debs for libglib2.0-0
       Reading package lists...
       Building dependency tree...
       0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 18 not upgraded.
       Need to get 1,287 kB of archives.
       After this operation, 0 B of additional disk space will be used.
       Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libglib2.0-0 amd64 2.64.6-1~ubuntu20.04.4 [1,287 kB]
       Fetched 1,287 kB in 1s (2,008 kB/s)
       Download complete and in download only mode
-----> Fetching .debs for libglib2.0-dev
       Reading package lists...
       Building dependency tree...
       0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 18 not upgraded.
       Need to get 1,506 kB of archives.
       After this operation, 0 B of additional disk space will be used.
       Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libglib2.0-dev amd64 2.64.6-1~ubuntu20.04.4 [1,506 kB]
       Fetched 1,506 kB in 1s (2,286 kB/s)
       Download complete and in download only mode
-----> Fetching .debs for libpoppler-glib8
       Reading package lists...
       Building dependency tree...
       The following additional packages will be installed:
         libnspr4 libnss3 libpoppler97
       The following NEW packages will be installed:
         libnspr4 libnss3 libpoppler-glib8 libpoppler97
       0 upgraded, 4 newly installed, 0 to remove and 18 not upgraded.
       Need to get 2,388 kB of archives.
       After this operation, 8,363 kB of additional disk space will be used.
       Get:1 http://archive.ubuntu.com/ubuntu focal/main amd64 libnspr4 amd64 2:4.25-1 [107 kB]
       Get:2 http://archive.ubuntu.com/ubuntu focal-security/main amd64 libnss3 amd64 2:3.49.1-1ubuntu1.5 [1,256 kB]
       Get:3 http://archive.ubuntu.com/ubuntu focal/main amd64 libpoppler97 amd64 0.86.1-0ubuntu1 [915 kB]
       Get:4 http://archive.ubuntu.com/ubuntu focal/main amd64 libpoppler-glib8 amd64 0.86.1-0ubuntu1 [109 kB]
       Fetched 2,388 kB in 1s (3,004 kB/s)
       Download complete and in download only mode
-----> Fetching .debs for libheif
       Reading package lists...
       Building dependency tree...
E: Unable to locate package libheif
 !     Push rejected, failed to compile Apt app.
 !     Push failed

@josephfrazier josephfrazier temporarily deployed to reported-web-heic-opena-clfxnp November 28, 2021 02:53 Inactive
@josephfrazier
Copy link
Owner Author

different error this time, I think this is the relevant part:

       [4/4] Building fresh packages...
       error /tmp/build_b6bd2203/node_modules/sharp: Command failed.
       Exit code: 1
       Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
       Arguments: 
       Directory: /tmp/build_b6bd2203/node_modules/sharp
       Output:
       info sharp Detected globally-installed libvips v8.10.6
       info sharp Building from source via node-gyp
       readelf: Error: '/usr/local/vips/lib/libvips-cpp.so': No such file

here's the whole thing

-----> Building on the Heroku-20 stack
-----> Using buildpacks:
       1. heroku-community/apt
       2. https://github.com/brandoncc/heroku-buildpack-vips
       3. heroku/nodejs
       4. jontewks/puppeteer
-----> Apt app detected
-----> Detected Aptfile or Stack changes, flushing cache
-----> Updating apt caches
       Get:1 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
       Get:2 http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease [86.6 kB]
       Get:3 http://archive.ubuntu.com/ubuntu focal-security InRelease [114 kB]
       Get:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
       Get:5 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [1,275 kB]
       Get:6 http://apt.postgresql.org/pub/repos/apt focal-pgdg/main amd64 Packages [356 kB]
       Get:7 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [11.3 MB]
       Get:8 http://archive.ubuntu.com/ubuntu focal-security/main amd64 Packages [1,281 kB]
       Get:9 http://archive.ubuntu.com/ubuntu focal-security/universe amd64 Packages [821 kB]
       Get:10 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,692 kB]
       Get:11 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1,098 kB]
       Fetched 18.4 MB in 2s (8,775 kB/s)
       Reading package lists...
-----> Fetching .debs for libglib2.0-0
       Reading package lists...
       Building dependency tree...
       0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 18 not upgraded.
       Need to get 1,287 kB of archives.
       After this operation, 0 B of additional disk space will be used.
       Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libglib2.0-0 amd64 2.64.6-1~ubuntu20.04.4 [1,287 kB]
       Fetched 1,287 kB in 1s (1,931 kB/s)
       Download complete and in download only mode
-----> Fetching .debs for libglib2.0-dev
       Reading package lists...
       Building dependency tree...
       0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 18 not upgraded.
       Need to get 1,506 kB of archives.
       After this operation, 0 B of additional disk space will be used.
       Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libglib2.0-dev amd64 2.64.6-1~ubuntu20.04.4 [1,506 kB]
       Fetched 1,506 kB in 1s (2,284 kB/s)
       Download complete and in download only mode
-----> Fetching .debs for libpoppler-glib8
       Reading package lists...
       Building dependency tree...
       The following additional packages will be installed:
         libnspr4 libnss3 libpoppler97
       The following NEW packages will be installed:
         libnspr4 libnss3 libpoppler-glib8 libpoppler97
       0 upgraded, 4 newly installed, 0 to remove and 18 not upgraded.
       Need to get 2,388 kB of archives.
       After this operation, 8,363 kB of additional disk space will be used.
       Get:1 http://archive.ubuntu.com/ubuntu focal/main amd64 libnspr4 amd64 2:4.25-1 [107 kB]
       Get:2 http://archive.ubuntu.com/ubuntu focal-security/main amd64 libnss3 amd64 2:3.49.1-1ubuntu1.5 [1,256 kB]
       Get:3 http://archive.ubuntu.com/ubuntu focal/main amd64 libpoppler97 amd64 0.86.1-0ubuntu1 [915 kB]
       Get:4 http://archive.ubuntu.com/ubuntu focal/main amd64 libpoppler-glib8 amd64 0.86.1-0ubuntu1 [109 kB]
       Fetched 2,388 kB in 1s (3,059 kB/s)
       Download complete and in download only mode
-----> Fetching .debs for libheif-dev
       Reading package lists...
       Building dependency tree...
       The following additional packages will be installed:
         libde265-0 libheif1 libnuma1 libx265-179
       The following NEW packages will be installed:
         libde265-0 libheif-dev libheif1 libnuma1 libx265-179
       0 upgraded, 5 newly installed, 0 to remove and 18 not upgraded.
       Need to get 1,506 kB of archives.
       After this operation, 17.7 MB of additional disk space will be used.
       Get:1 http://archive.ubuntu.com/ubuntu focal/main amd64 libnuma1 amd64 2.0.12-1 [20.8 kB]
       Get:2 http://archive.ubuntu.com/ubuntu focal/universe amd64 libde265-0 amd64 1.0.4-1build1 [239 kB]
       Get:3 http://archive.ubuntu.com/ubuntu focal/universe amd64 libx265-179 amd64 3.2.1-1build1 [1,060 kB]
       Get:4 http://archive.ubuntu.com/ubuntu focal/universe amd64 libheif1 amd64 1.6.1-1build1 [164 kB]
       Get:5 http://archive.ubuntu.com/ubuntu focal/universe amd64 libheif-dev amd64 1.6.1-1build1 [22.0 kB]
       Fetched 1,506 kB in 1s (2,119 kB/s)
       Download complete and in download only mode
-----> Installing libde265-0_1.0.4-1build1_amd64.deb
-----> Installing libglib2.0-0_2.64.6-1~ubuntu20.04.4_amd64.deb
-----> Installing libglib2.0-dev_2.64.6-1~ubuntu20.04.4_amd64.deb
-----> Installing libheif1_1.6.1-1build1_amd64.deb
-----> Installing libheif-dev_1.6.1-1build1_amd64.deb
-----> Installing libnspr4_2%3a4.25-1_amd64.deb
-----> Installing libnss3_2%3a3.49.1-1ubuntu1.5_amd64.deb
-----> Installing libnuma1_2.0.12-1_amd64.deb
-----> Installing libpoppler97_0.86.1-0ubuntu1_amd64.deb
-----> Installing libpoppler-glib8_0.86.1-0ubuntu1_amd64.deb
-----> Installing libx265-179_3.2.1-1build1_amd64.deb
-----> Writing profile script
-----> Rewrite package-config files
-----> vips (heroku-20 stack) app detected
-----> Vendoring binaries
       Fetching /tmp/codon/tmp/buildpacks/9d9d827d88c1c1e37cae04f38ca711f444f443aa/build/heroku-20.tar.gz
-----> Configuring build environment
-----> Building runtime environment
-----> Node.js app detected
       
-----> Creating runtime environment
       
       NPM_CONFIG_LOGLEVEL=error
       USE_YARN_CACHE=true
       NODE_VERBOSE=false
       NODE_ENV=production
       NODE_MODULES_CACHE=true
       
-----> Installing binaries
       engines.node (package.json):  16.13.0
       engines.npm (package.json):   >=3.10.10
       engines.yarn (package.json):  unspecified (use default)
       
       Resolving node version 16.13.0...
       Downloading and installing node 16.13.0...
       Bootstrapping npm >=3.10.10 (replacing 8.1.0)...
       npm >=3.10.10 installed
       Resolving yarn version 1.22.x...
       Downloading and installing yarn (1.22.17)
       Installed yarn 1.22.17
       
-----> Installing dependencies
       Installing node modules (yarn.lock)
       yarn install v1.22.17
       [1/4] Resolving packages...
       [2/4] Fetching packages...
       warning Pattern ["codemirror-graphql@timsuchanek/codemirror-graphql#details-fix"] is trying to unpack in the same destination "/tmp/yarncache.lAxPC/v6/npm-codemirror-graphql-0.6.12/node_modules/codemirror-graphql" as pattern ["codemirror-graphql@github:timsuchanek/codemirror-graphql#details-fix","codemirror-graphql@^0.6.11"]. This could result in non-deterministic behavior, skipping.
       warning file-loader@2.0.0: Invalid bin field for "file-loader".
       warning url-loader@1.1.2: Invalid bin field for "url-loader".
       [3/4] Linking dependencies...
       warning " > react-file-reader-input@1.1.4" has incorrect peer dependency "react@^15.0.0".
       warning " > react-google-maps@9.4.5" has unmet peer dependency "@types/googlemaps@^3.0.0".
       warning " > react-google-maps@9.4.5" has unmet peer dependency "@types/markerclustererplus@^2.1.29".
       warning " > react-google-maps@9.4.5" has unmet peer dependency "@types/react@^15.0.0 || ^16.0.0".
       warning "mongodb-runner > is-mongodb-running > ps-node > table-parser > @semantic-release/git@4.0.3" has unmet peer dependency "semantic-release@>=15.0.0 <16.0.0".
       warning "parse-dashboard > codemirror-graphql@0.6.12" has unmet peer dependency "codemirror@^5.26.0".
       warning "parse-dashboard > codemirror-graphql@0.6.12" has incorrect peer dependency "graphql@^0.10.0 || ^0.11.0 || ^0.12.0".
       warning "parse-dashboard > react-redux@5.1.1" has unmet peer dependency "redux@^2.0.0 || ^3.0.0 || ^4.0.0-0".
       warning "parse-dashboard > codemirror-graphql > graphql-language-service-interface@1.3.2" has incorrect peer dependency "graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0".
       warning "parse-dashboard > graphql-playground-react > react-codemirror@1.0.0" has incorrect peer dependency "react@>=15.5 <16".
       warning "parse-dashboard > graphql-playground-react > react-codemirror@1.0.0" has incorrect peer dependency "react-dom@>=15.5 <16".
       warning "parse-dashboard > codemirror-graphql > graphql-language-service-interface > graphql-config@2.0.1" has incorrect peer dependency "graphql@^0.11.0 || ^0.12.0 || ^0.13.0".
       warning "parse-dashboard > codemirror-graphql > graphql-language-service-interface > graphql-language-service-utils@1.2.2" has incorrect peer dependency "graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0".
       warning "parse-dashboard > codemirror-graphql > graphql-language-service-interface > graphql-config > graphql-import@0.4.5" has incorrect peer dependency "graphql@^0.11.0 || ^0.12.0 || ^0.13.0".
       [4/4] Building fresh packages...
       error /tmp/build_b6bd2203/node_modules/sharp: Command failed.
       Exit code: 1
       Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
       Arguments: 
       Directory: /tmp/build_b6bd2203/node_modules/sharp
       Output:
       info sharp Detected globally-installed libvips v8.10.6
       info sharp Building from source via node-gyp
       readelf: Error: '/usr/local/vips/lib/libvips-cpp.so': No such file
       gyp: Call to 'if readelf -Ws "$(PKG_CONFIG_PATH="/tmp/build_b6bd2203/.apt/usr/lib/x86_64-linux-gnu/pkgconfig:/tmp/build_b6bd2203/.apt/usr/lib/i386-linux-gnu/pkgconfig:/tmp/build_b6bd2203/.apt/usr/lib/pkgconfig::/tmp/build_b6bd2203/vendor/vips/lib/pkgconfig:/tmp/build_b6bd2203/.apt/usr/lib/x86_64-linux-gnu/pkgconfig:/tmp/build_b6bd2203/.apt/usr/lib/i386-linux-gnu/pkgconfig:/tmp/build_b6bd2203/.apt/usr/lib/pkgconfig::/usr/local/lib/pkgconfig:/usr/lib/pkgconfig" pkg-config --variable libdir vips-cpp)/libvips-cpp.so" | c++filt | grep -qF __cxx11;then echo "1";else echo "0";fi' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
       gyp ERR! configure error 
       gyp ERR! stack Error: `gyp` failed with exit code: 1
       gyp ERR! stack     at ChildProcess.onCpExit (/tmp/build_b6bd2203/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:259:16)
       gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
       gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
       gyp ERR! System Linux 4.4.0-1097-aws
       gyp ERR! command "/tmp/build_b6bd2203/.heroku/node/bin/node" "/tmp/build_b6bd2203/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
       gyp ERR! cwd /tmp/build_b6bd2203/node_modules/sharp
       gyp ERR! node -v v16.13.0
       gyp ERR! node-gyp -v v8.4.0
       gyp ERR! not ok
       info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
       warning Error running install script for optional dependency: "/tmp/build_b6bd2203/node_modules/bcrypt: Command failed.
       Exit code: 1
       Command: node-pre-gyp install --fallback-to-build
       Arguments: 
       Directory: /tmp/build_b6bd2203/node_modules/bcrypt
       Output:
       make: Entering directory '/tmp/build_b6bd2203/node_modules/bcrypt/build'
         CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
         CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
       ../src/bcrypt.cc: In function ‘void encode_salt(char*, u_int8_t*, char, u_int16_t, u_int8_t)’:
       ../src/bcrypt.cc:121:31: warning: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Wformat-truncation=]
         121 |  snprintf(salt + 4, 4, \"%2.2u$\", logr);
             |                               ^
       In file included from /usr/include/stdio.h:867,
                        from ../src/bcrypt.cc:34:
       /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: note: ‘__builtin___snprintf_chk’ output between 4 and 5 bytes into a destination of size 4
          67 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
             |          ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          68 |        __bos (__s), __fmt, __va_arg_pack ());
             |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       ../src/bcrypt.cc: In function ‘void bcrypt(const char*, const char*, char*)’:
       ../src/bcrypt.cc:264:36: warning: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Wformat-truncation=]
         264 |  snprintf(encrypted + i, 4, \"%2.2u$\", logr);
             |                                    ^
       In file included from /usr/include/stdio.h:867,
                        from ../src/bcrypt.cc:34:
       /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:35: note: ‘__builtin___snprintf_chk’ output between 4 and 5 bytes into a destination of size 4
          67 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
             |          ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          68 |        __bos (__s), __fmt, __va_arg_pack ());
             |        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
       In file included from ../node_modules/nan/nan_converters.h:67,
                        from ../node_modules/nan/nan.h:202,
                        from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan_converters_43_inl.h: In static member function ‘static Nan::imp::ToFactoryBase<v8::Boolean>::return_t Nan::imp::ToFactory<v8::Boolean>::convert(v8::Local<v8::Value>)’:
       ../node_modules/nan/nan_converters_43_inl.h:18:49: error: cannot convert ‘v8::Local<v8::Context>’ to ‘v8::Isolate*’
          18 |       val->To ## TYPE(isolate->GetCurrentContext())                            \\\n      |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
             |                                                 |
             |                                                 v8::Local<v8::Context>
       ../node_modules/nan/nan_converters_43_inl.h:22:1: note: in expansion of macro ‘X’
          22 | X(Boolean)
             | ^
       In file included from /app/.cache/node-gyp/16.13.0/include/node/node.h:63,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3086:37: note:   initializing argument 1 of ‘v8::Local<v8::Boolean> v8::Value::ToBoolean(v8::Isolate*) const’
        3086 |   Local<Boolean> ToBoolean(Isolate* isolate) const;
             |                            ~~~~~~~~~^~~~~~~
       In file included from ../node_modules/nan/nan_converters.h:67,
                        from ../node_modules/nan/nan.h:202,
                        from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan_converters_43_inl.h: In static member function ‘static Nan::imp::ValueFactoryBase<bool>::return_t Nan::imp::ToFactory<bool>::convert(v8::Local<v8::Value>)’:
       ../node_modules/nan/nan_converters_43_inl.h:37:55: error: cannot convert ‘v8::Local<v8::Context>’ to ‘v8::Isolate*’
          37 |   return val->NAME ## Value(isolate->GetCurrentContext());                     \\\n      |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
             |                                                       |
             |                                                       v8::Local<v8::Context>
       ../node_modules/nan/nan_converters_43_inl.h:40:1: note: in expansion of macro ‘X’
          40 | X(bool, Boolean)
             | ^
       In file included from /app/.cache/node-gyp/16.13.0/include/node/node.h:63,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3096:30: note:   initializing argument 1 of ‘bool v8::Value::BooleanValue(v8::Isolate*) const’
        3096 |   bool BooleanValue(Isolate* isolate) const;
             |                     ~~~~~~~~~^~~~~~~
       In file included from ../node_modules/nan/nan_new.h:189,
                        from ../node_modules/nan/nan.h:203,
                        from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::Function>::return_t Nan::imp::Factory<v8::Function>::New(Nan::FunctionCallback, v8::Local<v8::Value>)’:
       ../node_modules/nan/nan_implementation_12_inl.h:103:42: error: cannot convert ‘v8::Isolate*’ to ‘v8::Local<v8::Context>’
         103 |   return scope.Escape(v8::Function::New( isolate
             |                                          ^~~~~~~
             |                                          |
             |                                          v8::Isolate*
       In file included from /app/.cache/node-gyp/16.13.0/include/node/node.h:63,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:4754:22: note:   initializing argument 1 of ‘static v8::MaybeLocal<v8::Function> v8::Function::New(v8::Local<v8::Context>, v8::FunctionCallback, v8::Local<v8::Value>, int, v8::ConstructorBehavior, v8::SideEffectType)’
        4754 |       Local<Context> context, FunctionCallback callback,
             |       ~~~~~~~~~~~~~~~^~~~~~~
       In file included from ../node_modules/nan/nan_new.h:189,
                        from ../node_modules/nan/nan.h:203,
                        from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::StringObject>::return_t Nan::imp::Factory<v8::StringObject>::New(v8::Local<v8::String>)’:
       ../node_modules/nan/nan_implementation_12_inl.h:337:37: error: no matching function for call to ‘v8::StringObject::New(v8::Local<v8::String>&)’
         337 |   return v8::StringObject::New(value).As<v8::StringObject>();
             |                                     ^
       In file included from /app/.cache/node-gyp/16.13.0/include/node/node.h:63,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:6196:23: note: candidate: ‘static v8::Local<v8::Value> v8::StringObject::New(v8::Isolate*, v8::Local<v8::String>)’
        6196 |   static Local<Value> New(Isolate* isolate, Local<String> value);
             |                       ^~~
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:6196:23: note:   candidate expects 2 arguments, 1 provided
       In file included from ../node_modules/nan/nan_new.h:189,
                        from ../node_modules/nan/nan.h:203,
                        from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan_implementation_12_inl.h:337:58: error: expected primary-expression before ‘>’ token
         337 |   return v8::StringObject::New(value).As<v8::StringObject>();
             |                                                          ^
       ../node_modules/nan/nan_implementation_12_inl.h:337:60: error: expected primary-expression before ‘)’ token
         337 |   return v8::StringObject::New(value).As<v8::StringObject>();
             |                                                            ^
       In file included from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Local<v8::Value>)’:
       ../node_modules/nan/nan.h:1034:53: error: no matching function for call to ‘v8::Value::ToString()’
        1034 |       v8::Local<v8::String> string = from->ToString();
             |                                                     ^
       In file included from /app/.cache/node-gyp/16.13.0/include/node/node.h:63,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3048:44: note: candidate: ‘v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const’
        3048 |   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
             |                                            ^~~~~~~~
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3048:44: note:   candidate expects 1 argument, 0 provided
       In file included from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan.h:1044:37: error: cannot convert ‘char*’ to ‘v8::Isolate*’
        1044 |         length_ = string->WriteUtf8(str_, static_cast<int>(len), 0, flags);
             |                                     ^~~~
             |                                     |
             |                                     char*
       In file included from /app/.cache/node-gyp/16.13.0/include/node/node.h:63,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3277:26: note:   initializing argument 1 of ‘int v8::String::WriteUtf8(v8::Isolate*, char*, int, int*, int) const’
        3277 |   int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
             |                 ~~~~~~~~~^~~~~~~
       In file included from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan.h: In member function ‘void Nan::AsyncWorker::SaveToPersistent(const char*, const v8::Local<v8::Value>&)’:
       ../node_modules/nan/nan.h:1818:64: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, const v8::Local<v8::Value>&)’
        1818 |     New(persistentHandle)->Set(New(key).ToLocalChecked(), value);
             |                                                                ^
       In file included from /app/.cache/node-gyp/16.13.0/include/node/node.h:63,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3961:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
        3961 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
             |                                     ^~~
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3961:37: note:   candidate expects 3 arguments, 2 provided
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3964:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
        3964 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
             |                                     ^~~
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3964:37: note:   candidate expects 3 arguments, 2 provided
       In file included from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan.h: In member function ‘void Nan::AsyncWorker::SaveToPersistent(const v8::Local<v8::String>&, const v8::Local<v8::Value>&)’:
       ../node_modules/nan/nan.h:1824:42: error: no matching function for call to ‘v8::Object::Set(const v8::Local<v8::String>&, const v8::Local<v8::Value>&)’
        1824 |     New(persistentHandle)->Set(key, value);
             |                                          ^
       In file included from /app/.cache/node-gyp/16.13.0/include/node/node.h:63,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3961:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
        3961 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
             |                                     ^~~
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3961:37: note:   candidate expects 3 arguments, 2 provided
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3964:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
        3964 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
             |                                     ^~~
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3964:37: note:   candidate expects 3 arguments, 2 provided
       In file included from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan.h: In member function ‘void Nan::AsyncWorker::SaveToPersistent(uint32_t, const v8::Local<v8::Value>&)’:
       ../node_modules/nan/nan.h:1830:44: error: no matching function for call to ‘v8::Object::Set(uint32_t&, const v8::Local<v8::Value>&)’
        1830 |     New(persistentHandle)->Set(index, value);
             |                                            ^
       In file included from /app/.cache/node-gyp/16.13.0/include/node/node.h:63,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3961:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
        3961 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
             |                                     ^~~
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3961:37: note:   candidate expects 3 arguments, 2 provided
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3964:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
        3964 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
             |                                     ^~~
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3964:37: note:   candidate expects 3 arguments, 2 provided
       In file included from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::AsyncWorker::GetFromPersistent(const char*) const’:
       ../node_modules/nan/nan.h:1836:61: error: no matching function for call to ‘v8::Object::Get(v8::Local<v8::String>)’
        1836 |         New(persistentHandle)->Get(New(key).ToLocalChecked()));
             |                                                             ^
       In file included from /app/.cache/node-gyp/16.13.0/include/node/node.h:63,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:4007:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
        4007 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
             |                                           ^~~
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:4007:43: note:   candidate expects 2 arguments, 1 provided
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:4010:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
        4010 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
             |                                           ^~~
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:4010:43: note:   candidate expects 2 arguments, 1 provided
       In file included from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::AsyncWorker::GetFromPersistent(const v8::Local<v8::String>&) const’:
       ../node_modules/nan/nan.h:1842:55: error: no matching function for call to ‘v8::Object::Get(const v8::Local<v8::String>&)’
        1842 |     return scope.Escape(New(persistentHandle)->Get(key));
             |                                                       ^
       In file included from /app/.cache/node-gyp/16.13.0/include/node/node.h:63,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:4007:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
        4007 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
             |                                           ^~~
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:4007:43: note:   candidate expects 2 arguments, 1 provided
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:4010:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
        4010 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
             |                                           ^~~
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:4010:43: note:   candidate expects 2 arguments, 1 provided
       In file included from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::AsyncWorker::GetFromPersistent(uint32_t) const’:
       ../node_modules/nan/nan.h:1847:57: error: no matching function for call to ‘v8::Object::Get(uint32_t&)’
        1847 |     return scope.Escape(New(persistentHandle)->Get(index));
             |                                                         ^
       In file included from /app/.cache/node-gyp/16.13.0/include/node/node.h:63,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:4007:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
        4007 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
             |                                           ^~~
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:4007:43: note:   candidate expects 2 arguments, 1 provided
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:4010:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
        4010 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
             |                                           ^~~
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:4010:43: note:   candidate expects 2 arguments, 1 provided
       In file included from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
       ../node_modules/nan/nan.h:2167:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
        2167 |     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
             |                                                              ^
       In file included from /usr/include/c++/9/cassert:44,
                        from /app/.cache/node-gyp/16.13.0/include/node/node_object_wrap.h:26,
                        from ../node_modules/nan/nan.h:53,
                        from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan_object_wrap.h: In destructor ‘virtual Nan::ObjectWrap::~ObjectWrap()’:
       ../node_modules/nan/nan_object_wrap.h:24:25: error: ‘class Nan::Persistent<v8::Object>’ has no member named ‘IsNearDeath’
          24 |     assert(persistent().IsNearDeath());
             |                         ^~~~~~~~~~~
       In file included from ../node_modules/nan/nan.h:2657,
                        from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan_object_wrap.h: In member function ‘void Nan::ObjectWrap::MakeWeak()’:
       ../node_modules/nan/nan_object_wrap.h:67:18: error: ‘class Nan::Persistent<v8::Object>’ has no member named ‘MarkIndependent’
          67 |     persistent().MarkIndependent();
             |                  ^~~~~~~~~~~~~~~
       In file included from /usr/include/c++/9/cassert:44,
                        from /app/.cache/node-gyp/16.13.0/include/node/node_object_wrap.h:26,
                        from ../node_modules/nan/nan.h:53,
                        from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan_object_wrap.h: In static member function ‘static void Nan::ObjectWrap::WeakCallback(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’:
       ../node_modules/nan/nan_object_wrap.h:124:26: error: ‘class Nan::Persistent<v8::Object>’ has no member named ‘IsNearDeath’
         124 |     assert(wrap->handle_.IsNearDeath());
             |                          ^~~~~~~~~~~
       ../src/bcrypt_node.cc: In function ‘char {anonymous}::ToCharVersion(v8::Local<v8::String>)’:
       ../src/bcrypt_node.cc:66:30: error: no matching function for call to ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::String>&)’
          66 |   String::Utf8Value value(str);
             |                              ^
       In file included from /app/.cache/node-gyp/16.13.0/include/node/node.h:63,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3581:5: note: candidate: ‘v8::String::Utf8Value::Utf8Value(v8::Isolate*, v8::Local<v8::Value>)’
        3581 |     Utf8Value(Isolate* isolate, Local<v8::Value> obj);
             |     ^~~~~~~~~
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3581:5: note:   candidate expects 2 arguments, 1 provided
       ../src/bcrypt_node.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::GenerateSalt(Nan::NAN_METHOD_ARGS_TYPE)’:
       ../src/bcrypt_node.cc:121:60: error: no matching function for call to ‘v8::Value::ToString()’
         121 |     const char minor_ver = ToCharVersion(info[0]->ToString());
             |                                                            ^
       In file included from /app/.cache/node-gyp/16.13.0/include/node/node.h:63,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3048:44: note: candidate: ‘v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const’
        3048 |   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
             |                                            ^~~~~~~~
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3048:44: note:   candidate expects 1 argument, 0 provided
       ../src/bcrypt_node.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::GenerateSaltSync(Nan::NAN_METHOD_ARGS_TYPE)’:
       ../src/bcrypt_node.cc:150:60: error: no matching function for call to ‘v8::Value::ToString()’
         150 |     const char minor_ver = ToCharVersion(info[0]->ToString());
             |                                                            ^
       In file included from /app/.cache/node-gyp/16.13.0/include/node/node.h:63,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3048:44: note: candidate: ‘v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const’
        3048 |   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
             |                                            ^~~~~~~~
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3048:44: note:   candidate expects 1 argument, 0 provided
       ../src/bcrypt_node.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Encrypt(Nan::NAN_METHOD_ARGS_TYPE)’:
       ../src/bcrypt_node.cc:212:44: error: no matching function for call to ‘v8::Value::ToString()’
         212 |     Nan::Utf8String data(info[0]->ToString());
             |                                            ^
       In file included from /app/.cache/node-gyp/16.13.0/include/node/node.h:63,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3048:44: note: candidate: ‘v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const’
        3048 |   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
             |                                            ^~~~~~~~
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3048:44: note:   candidate expects 1 argument, 0 provided
       ../src/bcrypt_node.cc:213:44: error: no matching function for call to ‘v8::Value::ToString()’
         213 |     Nan::Utf8String salt(info[1]->ToString());
             |                                            ^
       In file included from /app/.cache/node-gyp/16.13.0/include/node/node.h:63,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3048:44: note: candidate: ‘v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const’
        3048 |   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
             |                                            ^~~~~~~~
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3048:44: note:   candidate expects 1 argument, 0 provided
       ../src/bcrypt_node.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::EncryptSync(Nan::NAN_METHOD_ARGS_TYPE)’:
       ../src/bcrypt_node.cc:231:44: error: no matching function for call to ‘v8::Value::ToString()’
         231 |     Nan::Utf8String data(info[0]->ToString());
             |                                            ^
       In file included from /app/.cache/node-gyp/16.13.0/include/node/node.h:63,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3048:44: note: candidate: ‘v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const’
        3048 |   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
             |                                            ^~~~~~~~
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3048:44: note:   candidate expects 1 argument, 0 provided
       ../src/bcrypt_node.cc:232:44: error: no matching function for call to ‘v8::Value::ToString()’
         232 |     Nan::Utf8String salt(info[1]->ToString());
             |                                            ^
       In file included from /app/.cache/node-gyp/16.13.0/include/node/node.h:63,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3048:44: note: candidate: ‘v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const’
        3048 |   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
             |                                            ^~~~~~~~
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3048:44: note:   candidate expects 1 argument, 0 provided
       ../src/bcrypt_node.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Compare(Nan::NAN_METHOD_ARGS_TYPE)’:
       ../src/bcrypt_node.cc:312:45: error: no matching function for call to ‘v8::Value::ToString()’
         312 |     Nan::Utf8String input(info[0]->ToString());
             |                                             ^
       In file included from /app/.cache/node-gyp/16.13.0/include/node/node.h:63,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3048:44: note: candidate: ‘v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const’
        3048 |   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
             |                                            ^~~~~~~~
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3048:44: note:   candidate expects 1 argument, 0 provided
       ../src/bcrypt_node.cc:313:49: error: no matching function for call to ‘v8::Value::ToString()’
         313 |     Nan::Utf8String encrypted(info[1]->ToString());
             |                                                 ^
       In file included from /app/.cache/node-gyp/16.13.0/include/node/node.h:63,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3048:44: note: candidate: ‘v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const’
        3048 |   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
             |                                            ^~~~~~~~
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3048:44: note:   candidate expects 1 argument, 0 provided
       ../src/bcrypt_node.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::CompareSync(Nan::NAN_METHOD_ARGS_TYPE)’:
       ../src/bcrypt_node.cc:331:42: error: no matching function for call to ‘v8::Value::ToString()’
         331 |     Nan::Utf8String pw(info[0]->ToString());
             |                                          ^
       In file included from /app/.cache/node-gyp/16.13.0/include/node/node.h:63,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3048:44: note: candidate: ‘v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const’
        3048 |   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
             |                                            ^~~~~~~~
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3048:44: note:   candidate expects 1 argument, 0 provided
       ../src/bcrypt_node.cc:332:44: error: no matching function for call to ‘v8::Value::ToString()’
         332 |     Nan::Utf8String hash(info[1]->ToString());
             |                                            ^
       In file included from /app/.cache/node-gyp/16.13.0/include/node/node.h:63,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3048:44: note: candidate: ‘v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const’
        3048 |   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
             |                                            ^~~~~~~~
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3048:44: note:   candidate expects 1 argument, 0 provided
       ../src/bcrypt_node.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::GetRounds(Nan::NAN_METHOD_ARGS_TYPE)’:
       ../src/bcrypt_node.cc:352:44: error: no matching function for call to ‘v8::Value::ToString()’
         352 |     Nan::Utf8String hash(info[0]->ToString());
             |                                            ^
       In file included from /app/.cache/node-gyp/16.13.0/include/node/node.h:63,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3048:44: note: candidate: ‘v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const’
        3048 |   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
             |                                            ^~~~~~~~
       /app/.cache/node-gyp/16.13.0/include/node/v8.h:3048:44: note:   candidate expects 1 argument, 0 provided
       In file included from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       ../src/bcrypt_node.cc: At global scope:
       /app/.cache/node-gyp/16.13.0/include/node/node.h:821:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
         821 |       (node::addon_register_func) (regfunc),                          \\\n      |                                           ^
       /app/.cache/node-gyp/16.13.0/include/node/node.h:855:3: note: in expansion of macro ‘NODE_MODULE_X’
         855 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
             |   ^~~~~~~~~~~~~
       ../src/bcrypt_node.cc:375:1: note: in expansion of macro ‘NODE_MODULE’
         375 | NODE_MODULE(bcrypt_lib, init);
             | ^~~~~~~~~~~
       ../src/bcrypt_node.cc:65:6: warning: ‘char {anonymous}::ToCharVersion(v8::Local<v8::String>)’ defined but not used [-Wunused-function]
          65 | char ToCharVersion(Local<String> str) {
             |      ^~~~~~~~~~~~~
       make: *** [bcrypt_lib.target.mk:115: Release/obj.target/bcrypt_lib/src/bcrypt_node.o] Error 1
       gyp ERR! build error 
       gyp ERR! stack Error: `make` failed with exit code: 2
       gyp ERR! stack     at ChildProcess.onExit (/tmp/build_b6bd2203/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
       gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
       gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
       gyp ERR! System Linux 4.4.0-1097-aws
       gyp ERR! command \"/tmp/build_b6bd2203/.heroku/node/bin/node\" \"/tmp/build_b6bd2203/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"build\" \"--fallback-to-build\" \"--module=/tmp/build_b6bd2203/node_modules/bcrypt/lib/binding/bcrypt_lib.node\" \"--module_name=bcrypt_lib\" \"--module_path=/tmp/build_b6bd2203/node_modules/bcrypt/lib/binding\" \"--napi_version=8\" \"--node_abi_napi=napi\"
       gyp ERR! cwd /tmp/build_b6bd2203/node_modules/bcrypt
       gyp ERR! node -v v16.13.0
       gyp ERR! node-gyp -v v8.4.0
       gyp ERR! not ok 
       make: Leaving directory '/tmp/build_b6bd2203/node_modules/bcrypt/build'
       node-pre-gyp ERR! build error 
       node-pre-gyp ERR! stack Error: Failed to execute '/tmp/build_b6bd2203/.heroku/node/bin/node /tmp/build_b6bd2203/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/tmp/build_b6bd2203/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/tmp/build_b6bd2203/node_modules/bcrypt/lib/binding --napi_version=8 --node_abi_napi=napi' (1)
       node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/tmp/build_b6bd2203/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
       node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
       node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1064:16)
       node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
       node-pre-gyp ERR! System Linux 4.4.0-1097-aws
       node-pre-gyp ERR! command \"/tmp/build_b6bd2203/.heroku/node/bin/node\" \"/tmp/build_b6bd2203/node_modules/bcrypt/node_modules/.bin/node-pre-gyp\" \"install\" \"--fallback-to-build\"
       node-pre-gyp ERR! cwd /tmp/build_b6bd2203/node_modules/bcrypt
       node-pre-gyp ERR! node -v v16.13.0
       node-pre-gyp ERR! node-pre-gyp -v v0.10.2
       node-pre-gyp ERR! not ok 
       Failed to execute '/tmp/build_b6bd2203/.heroku/node/bin/node /tmp/build_b6bd2203/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/tmp/build_b6bd2203/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/tmp/build_b6bd2203/node_modules/bcrypt/lib/binding --napi_version=8 --node_abi_napi=napi' (1)"
       info This module is OPTIONAL, you can safely ignore this error
-----> Build failed
       
       We're sorry this build is failing! You can troubleshoot common issues here:
       https://devcenter.heroku.com/articles/troubleshooting-node-deploys
       
       If you're stuck, please submit a ticket so we can help:
       https://help.heroku.com/
       
       Love,
       Heroku
       
 !     Push rejected, failed to compile Node.js app.
 !     Push failed

@josephfrazier josephfrazier temporarily deployed to reported-web-heic-opena-atzbfy November 28, 2021 03:04 Inactive
@josephfrazier josephfrazier temporarily deployed to reported-web-heic-opena-5txzts November 28, 2021 03:34 Inactive
@josephfrazier josephfrazier temporarily deployed to reported-web-heic-opena-1wjkju November 28, 2021 03:37 Inactive
It seems like it's "working" on JPEGs and messing things up
@josephfrazier josephfrazier temporarily deployed to reported-web-heic-opena-1wjkju November 28, 2021 04:06 Inactive
@josephfrazier
Copy link
Owner Author

josephfrazier commented Nov 28, 2021

EDIT: probably just a local thing, see next comment

Hmm, got some errors locally when trying to submit a HEIC file I made by using https://convertio.co/jpg-heic/ on this file:

PXL_20211027_193810958

HEIC file detected, trying to convert to JPEG
could not convert file from heic to jpg
[Error: source: bad seek to 2709778
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
heif: Unsupported feature: Unsupported codec (4.3000)
]
heicConvert: 38.947ms

@josephfrazier
Copy link
Owner Author

josephfrazier commented Nov 28, 2021

Ok, I'm guessing the above error is because I haven't set up VIPS on my local machine. I tried the same file on the review app, and got this in the heroku logs:

2021-11-28T04:11:41.736728+00:00 app[web.1]: HEIC file detected, trying to convert to JPEG
2021-11-28T04:11:42.937830+00:00 app[web.1]: free(): invalid next size (fast)
2021-11-28T04:11:42.947319+00:00 heroku[router]: at=error code=H13 desc="Connection closed without response" method=POST path="/openalpr" host=reported-web-heic-opena-1wjkju.herokuapp.com request_id=b421aa8e-d68f-4e2b-96c9-fcd88d40ad94 fwd="172.58.229.168" dyno=web.1 connect=5000ms service=1259ms status=503 bytes=0 protocol=https
2021-11-28T04:11:43.061244+00:00 heroku[web.1]: Process exited with status 134
2021-11-28T04:11:43.203294+00:00 heroku[web.1]: State changed from up to crashed
2021-11-28T04:11:48.102814+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/openalpr" host=reported-web-heic-opena-1wjkju.herokuapp.com request_id=6d0aa185-216e-48be-ae06-36611217c4ea fwd="172.58.229.168" dyno=web.1 connect=5000ms service= status=503 bytes= protocol=https

potentially related: lovell/sharp#1359

@josephfrazier josephfrazier temporarily deployed to reported-web-heic-opena-1wjkju November 28, 2021 04:36 Inactive
@josephfrazier josephfrazier temporarily deployed to reported-web-heic-opena-1wjkju November 28, 2021 04:41 Inactive
@josephfrazier josephfrazier temporarily deployed to reported-web-heic-opena-1wjkju November 28, 2021 04:47 Inactive
@josephfrazier josephfrazier temporarily deployed to reported-web-heic-opena-1wjkju November 28, 2021 05:08 Inactive
@josephfrazier josephfrazier temporarily deployed to reported-web-heic-opena-1wjkju November 28, 2021 05:11 Inactive
@josephfrazier
Copy link
Owner Author

I remembered that sharp does bundle VIPS, so we could try going back to not installing it globally, but then I think we'd lose HEIC support, see https://github.com/lovell/sharp/blob/2ffdae2914811a040c8ab94970efe58ebba23504/docs/api-output.md#heif

Support for patent-encumbered HEIC images requires the use of a globally-installed libvips compiled with support for libheif, libde265 and x265.

@josephfrazier josephfrazier temporarily deployed to reported-web-heic-opena-iadtsh October 2, 2022 00:26 Inactive
@josephfrazier
Copy link
Owner Author

josephfrazier commented Oct 2, 2022

@josephfrazier josephfrazier reopened this Jul 9, 2023
@josephfrazier josephfrazier temporarily deployed to reported-web-heic-opena-ckblt9 July 9, 2023 19:45 Inactive
@josephfrazier
Copy link
Owner Author

Fresh review app failure: https://dashboard.heroku.com/pipelines/cbc31c26-1c82-4965-91c0-8e311d3fa64b/app-setup/21b8b308-0a2d-4c6b-9243-e42302fc25fb

-----> Building on the Heroku-22 stack
-----> Using buildpacks:
       1. https://github.com/gaffneyc/heroku-buildpack-jemalloc
       2. heroku-community/apt
       3. https://github.com/brandoncc/heroku-buildpack-vips
       4. heroku/nodejs
       5. jontewks/puppeteer
-----> jemalloc app detected
-----> jemalloc: Vendoring 5.2.1
       jemalloc: Fetching https://github.com/gaffneyc/heroku-buildpack-jemalloc/releases/download/heroku-22/jemalloc-5.2.1.tar.bz2
-----> jemalloc: Building runtime environment
-----> Apt app detected
-----> Detected Aptfile or Stack changes, flushing cache
-----> Updating apt caches
       Get:1 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
       Get:2 http://archive.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
       Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
       Get:4 http://apt.postgresql.org/pub/repos/apt jammy-pgdg InRelease [123 kB]
       Get:5 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [17.5 MB]
       Get:6 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1,792 kB]
       Get:7 http://archive.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [947 kB]
       Get:8 http://archive.ubuntu.com/ubuntu jammy-security/main amd64 Packages [696 kB]
       Get:9 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1,200 kB]
       Get:10 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [989 kB]
       Get:11 http://apt.postgresql.org/pub/repos/apt jammy-pgdg/main amd64 Packages [445 kB]
       Fetched 24.2 MB in 1s (18.5 MB/s)
       Reading package lists...
W: http://apt.postgresql.org/pub/repos/apt/dists/jammy-pgdg/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
-----> Fetching .debs for libglib2.0-0
       Reading package lists...
       Building dependency tree...
       0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 3 not upgraded.
       Need to get 1,463 kB of archives.
       After this operation, 0 B of additional disk space will be used.
       Get:1 http://archive.ubuntu.com/ubuntu jammy-security/main amd64 libglib2.0-0 amd64 2.72.4-0ubuntu2.2 [1,463 kB]
       Fetched 1,463 kB in 1s (2,213 kB/s)
       Download complete and in download only mode
-----> Fetching .debs for libglib2.0-dev
       Reading package lists...
       Building dependency tree...
       0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 3 not upgraded.
       Need to get 1,739 kB of archives.
       After this operation, 0 B of additional disk space will be used.
       Get:1 http://archive.ubuntu.com/ubuntu jammy-security/main amd64 libglib2.0-dev amd64 2.72.4-0ubuntu2.2 [1,739 kB]
       Fetched 1,739 kB in 0s (15.0 MB/s)
       Download complete and in download only mode
-----> Fetching .debs for libpoppler-glib8
       Reading package lists...
       Building dependency tree...
       0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 3 not upgraded.
       Need to get 133 kB of archives.
       After this operation, 0 B of additional disk space will be used.
       Get:1 http://archive.ubuntu.com/ubuntu jammy-security/main amd64 libpoppler-glib8 amd64 22.02.0-2ubuntu0.1 [133 kB]
       Fetched 133 kB in 0s (329 kB/s)
       Download complete and in download only mode
-----> Fetching .debs for libpoppler-glib-dev
       Reading package lists...
       Building dependency tree...
       The following additional packages will be installed:
         gir1.2-poppler-0.18 libpoppler-dev
       Suggested packages:
         libpoppler-glib-doc
       The following NEW packages will be installed:
         gir1.2-poppler-0.18 libpoppler-dev libpoppler-glib-dev
       0 upgraded, 3 newly installed, 0 to remove and 3 not upgraded.
       Need to get 98.8 kB of archives.
       After this operation, 997 kB of additional disk space will be used.
       Get:1 http://archive.ubuntu.com/ubuntu jammy-security/main amd64 gir1.2-poppler-0.18 amd64 22.02.0-2ubuntu0.1 [24.7 kB]
       Get:2 http://archive.ubuntu.com/ubuntu jammy-security/main amd64 libpoppler-dev amd64 22.02.0-2ubuntu0.1 [5,182 B]
       Get:3 http://archive.ubuntu.com/ubuntu jammy-security/main amd64 libpoppler-glib-dev amd64 22.02.0-2ubuntu0.1 [68.9 kB]
       Fetched 98.8 kB in 0s (1,340 kB/s)
       Download complete and in download only mode
-----> Fetching .debs for libheif-dev
       Reading package lists...
       Building dependency tree...
       0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 3 not upgraded.
       Need to get 26.4 kB of archives.
       After this operation, 0 B of additional disk space will be used.
       Get:1 http://archive.ubuntu.com/ubuntu jammy/universe amd64 libheif-dev amd64 1.12.0-2build1 [26.4 kB]
       Fetched 26.4 kB in 0s (107 kB/s)
       Download complete and in download only mode
-----> Fetching .debs for libfftw3-dev
       Reading package lists...
       Building dependency tree...
       The following additional packages will be installed:
         libfftw3-bin libfftw3-long3 libfftw3-quad3 libfftw3-single3
       Suggested packages:
         libfftw3-doc
       The following NEW packages will be installed:
         libfftw3-bin libfftw3-dev libfftw3-long3 libfftw3-quad3 libfftw3-single3
       0 upgraded, 5 newly installed, 0 to remove and 3 not upgraded.
       Need to get 3,884 kB of archives.
       After this operation, 22.4 MB of additional disk space will be used.
       Get:1 http://archive.ubuntu.com/ubuntu jammy/main amd64 libfftw3-long3 amd64 3.3.8-2ubuntu8 [335 kB]
       Get:2 http://archive.ubuntu.com/ubuntu jammy/main amd64 libfftw3-quad3 amd64 3.3.8-2ubuntu8 [614 kB]
       Get:3 http://archive.ubuntu.com/ubuntu jammy/main amd64 libfftw3-single3 amd64 3.3.8-2ubuntu8 [800 kB]
       Get:4 http://archive.ubuntu.com/ubuntu jammy/main amd64 libfftw3-bin amd64 3.3.8-2ubuntu8 [35.5 kB]
       Get:5 http://archive.ubuntu.com/ubuntu jammy/main amd64 libfftw3-dev amd64 3.3.8-2ubuntu8 [2,101 kB]
       Fetched 3,884 kB in 0s (27.2 MB/s)
       Download complete and in download only mode
-----> Fetching .debs for libwebp-dev
       Reading package lists...
       Building dependency tree...
       The following NEW packages will be installed:
         libwebp-dev
       0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
       Need to get 297 kB of archives.
       After this operation, 976 kB of additional disk space will be used.
       Get:1 http://archive.ubuntu.com/ubuntu jammy-security/main amd64 libwebp-dev amd64 1.2.2-2ubuntu0.22.04.1 [297 kB]
       Fetched 297 kB in 0s (597 kB/s)
       Download complete and in download only mode
-----> Installing gir1.2-poppler-0.18_22.02.0-2ubuntu0.1_amd64.deb
-----> Installing libfftw3-bin_3.3.8-2ubuntu8_amd64.deb
-----> Installing libfftw3-dev_3.3.8-2ubuntu8_amd64.deb
-----> Installing libfftw3-long3_3.3.8-2ubuntu8_amd64.deb
-----> Installing libfftw3-quad3_3.3.8-2ubuntu8_amd64.deb
-----> Installing libfftw3-single3_3.3.8-2ubuntu8_amd64.deb
-----> Installing libglib2.0-0_2.72.4-0ubuntu2.2_amd64.deb
-----> Installing libglib2.0-dev_2.72.4-0ubuntu2.2_amd64.deb
-----> Installing libheif-dev_1.12.0-2build1_amd64.deb
-----> Installing libpoppler-dev_22.02.0-2ubuntu0.1_amd64.deb
-----> Installing libpoppler-glib8_22.02.0-2ubuntu0.1_amd64.deb
-----> Installing libpoppler-glib-dev_22.02.0-2ubuntu0.1_amd64.deb
-----> Installing libwebp-dev_1.2.2-2ubuntu0.22.04.1_amd64.deb
-----> Writing profile script
-----> Rewrite package-config files
-----> vips (heroku-22 stack) app detected
-----> Vendoring binaries
       Fetching /tmp/codon/tmp/buildpacks/9d9d827d88c1c1e37cae04f38ca711f444f443aa/build/heroku-22.tar.gz
-----> Configuring build environment
-----> Building runtime environment
-----> Node.js app detected
       
-----> Creating runtime environment
       
       NPM_CONFIG_LOGLEVEL=error
       USE_YARN_CACHE=true
       NODE_VERBOSE=false
       NODE_ENV=production
       NODE_MODULES_CACHE=false
       
-----> Installing binaries
       engines.node (package.json):  18.12.1
       engines.npm (package.json):   >=3.10.10
       engines.yarn (package.json):  unspecified (use default)
       
       Resolving node version 18.12.1...
       Downloading and installing node 18.12.1...
       Bootstrapping npm >=3.10.10 (replacing 8.19.2)...
       npm 9.8.0 installed
       Resolving yarn version 1.22.x...
       Downloading and installing yarn (1.22.19)
       Installed yarn 1.22.19
       
-----> Restoring cache
       Caching has been disabled because NODE_MODULES_CACHE=false
       
-----> Prebuild
       Running heroku-prebuild (yarn)
       yarn run v1.22.19
       $ scripts/heroku-prebuild
       Done in 0.07s.
       
-----> Installing dependencies
       Installing node modules (yarn.lock)
       yarn install v1.22.19
       [1/4] Resolving packages...
       [2/4] Fetching packages...
       warning file-loader@2.0.0: Invalid bin field for "file-loader".
       warning url-loader@1.1.2: Invalid bin field for "url-loader".
       [3/4] Linking dependencies...
       warning " > react-google-maps@9.4.5" has unmet peer dependency "@types/googlemaps@^3.0.0".
       warning " > react-google-maps@9.4.5" has unmet peer dependency "@types/markerclustererplus@^2.1.29".
       warning " > react-google-maps@9.4.5" has unmet peer dependency "@types/react@^15.0.0 || ^16.0.0".
       warning " > css-loader@1.0.1" has incorrect peer dependency "webpack@^4.0.0".
       warning " > eslint-loader@2.2.1" has incorrect peer dependency "webpack@>=2.0.0 <5.0.0".
       warning " > file-loader@2.0.0" has incorrect peer dependency "webpack@^2.0.0 || ^3.0.0 || ^4.0.0".
       warning "mongodb-runner > is-mongodb-running > ps-node > table-parser > @semantic-release/git@4.0.3" has unmet peer dependency "semantic-release@>=15.0.0 <16.0.0".
       warning "parse-dashboard > graphiql > @graphiql/react > @reach/menu-button@0.17.0" has unmet peer dependency "react-is@^16.8.0 || 17.x".
       warning "parse-dashboard > graphiql > @graphiql/react > codemirror-graphql@2.0.9" has unmet peer dependency "@codemirror/language@6.0.0".
       warning "react-dev-utils > fork-ts-checker-webpack-plugin@6.5.3" has unmet peer dependency "typescript@>= 2.7".
       warning " > stylelint-order@1.0.0" has incorrect peer dependency "stylelint@^9.0.0".
       warning " > url-loader@1.1.2" has incorrect peer dependency "webpack@^3.0.0 || ^4.0.0".
       [4/4] Building fresh packages...
       error /tmp/build_e80a8a40/node_modules/sharp: Command failed.
       Exit code: 127
       Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
       Arguments: 
       Directory: /tmp/build_e80a8a40/node_modules/sharp
       Output:
       info sharp Detected globally-installed libvips v8.13.0
       info sharp Building from source via node-gyp
       /bin/sh: 1: node-gyp: not found
       info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
       warning Error running install script for optional dependency: "/tmp/build_e80a8a40/node_modules/bcrypt: Command failed.
       Exit code: 1
       Command: node-pre-gyp install --fallback-to-build
       Arguments: 
       Directory: /tmp/build_e80a8a40/node_modules/bcrypt
       Output:
       make: Entering directory '/tmp/build_e80a8a40/node_modules/bcrypt/build'
         CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
         CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
       ../src/bcrypt.cc: In function ‘void encode_salt(char*, u_int8_t*, char, u_int16_t, u_int8_t)’:
       ../src/bcrypt.cc:121:38: warning: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Wformat-truncation=]
         121 |         snprintf(salt + 4, 4, \"%2.2u$\", logr);
             |                                      ^
       In file included from /usr/include/stdio.h:894,
                        from ../src/bcrypt.cc:34:
       /usr/include/x86_64-linux-gnu/bits/stdio2.h:71:35: note: ‘__builtin___snprintf_chk’ output between 4 and 5 bytes into a destination of size 4
          71 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
             |          ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          72 |                                    __glibc_objsize (__s), __fmt,
             |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          73 |                                    __va_arg_pack ());
             |                                    ~~~~~~~~~~~~~~~~~
       ../src/bcrypt.cc: In function ‘void bcrypt(const char*, const char*, char*)’:
       ../src/bcrypt.cc:264:43: warning: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Wformat-truncation=]
         264 |         snprintf(encrypted + i, 4, \"%2.2u$\", logr);
             |                                           ^
       In file included from /usr/include/stdio.h:894,
                        from ../src/bcrypt.cc:34:
       /usr/include/x86_64-linux-gnu/bits/stdio2.h:71:35: note: ‘__builtin___snprintf_chk’ output between 4 and 5 bytes into a destination of size 4
          71 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
             |          ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          72 |                                    __glibc_objsize (__s), __fmt,
             |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          73 |                                    __va_arg_pack ());
             |                                    ~~~~~~~~~~~~~~~~~
         CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
       In file included from ../node_modules/nan/nan_converters.h:67,
                        from ../node_modules/nan/nan.h:202,
                        from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan_converters_43_inl.h: In static member function ‘static Nan::imp::ToFactoryBase<v8::Boolean>::return_t Nan::imp::ToFactory<v8::Boolean>::convert(v8::Local<v8::Value>)’:
       ../node_modules/nan/nan_converters_43_inl.h:18:49: error: cannot convert ‘v8::Local<v8::Context>’ to ‘v8::Isolate*’
          18 |       val->To ## TYPE(isolate->GetCurrentContext())                            \\\n      |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
             |                                                 |
             |                                                 v8::Local<v8::Context>
       ../node_modules/nan/nan_converters_43_inl.h:22:1: note: in expansion of macro ‘X’
          22 | X(Boolean)
             | ^
       In file included from /app/.cache/node-gyp/18.12.1/include/node/v8-primitive.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-array-buffer.h:13,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8.h:24,
                        from /app/.cache/node-gyp/18.12.1/include/node/node.h:73,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/18.12.1/include/node/v8-value.h:398:37: note:   initializing argument 1 of ‘v8::Local<v8::Boolean> v8::Value::ToBoolean(v8::Isolate*) const’
         398 |   Local<Boolean> ToBoolean(Isolate* isolate) const;
             |                            ~~~~~~~~~^~~~~~~
       In file included from ../node_modules/nan/nan_converters.h:67,
                        from ../node_modules/nan/nan.h:202,
                        from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan_converters_43_inl.h: In static member function ‘static Nan::imp::ValueFactoryBase<bool>::return_t Nan::imp::ToFactory<bool>::convert(v8::Local<v8::Value>)’:
       ../node_modules/nan/nan_converters_43_inl.h:37:55: error: cannot convert ‘v8::Local<v8::Context>’ to ‘v8::Isolate*’
          37 |   return val->NAME ## Value(isolate->GetCurrentContext());                     \\\n      |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
             |                                                       |
             |                                                       v8::Local<v8::Context>
       ../node_modules/nan/nan_converters_43_inl.h:40:1: note: in expansion of macro ‘X’
          40 | X(bool, Boolean)
             | ^
       In file included from /app/.cache/node-gyp/18.12.1/include/node/v8-primitive.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-array-buffer.h:13,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8.h:24,
                        from /app/.cache/node-gyp/18.12.1/include/node/node.h:73,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/18.12.1/include/node/v8-value.h:408:30: note:   initializing argument 1 of ‘bool v8::Value::BooleanValue(v8::Isolate*) const’
         408 |   bool BooleanValue(Isolate* isolate) const;
             |                     ~~~~~~~~~^~~~~~~
       In file included from ../node_modules/nan/nan_new.h:189,
                        from ../node_modules/nan/nan.h:203,
                        from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::Function>::return_t Nan::imp::Factory<v8::Function>::New(Nan::FunctionCallback, v8::Local<v8::Value>)’:
       ../node_modules/nan/nan_implementation_12_inl.h:103:42: error: cannot convert ‘v8::Isolate*’ to ‘v8::Local<v8::Context>’
         103 |   return scope.Escape(v8::Function::New( isolate
             |                                          ^~~~~~~
             |                                          |
             |                                          v8::Isolate*
       In file included from /app/.cache/node-gyp/18.12.1/include/node/v8.h:33,
                        from /app/.cache/node-gyp/18.12.1/include/node/node.h:73,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/18.12.1/include/node/v8-function.h:33:22: note:   initializing argument 1 of ‘static v8::MaybeLocal<v8::Function> v8::Function::New(v8::Local<v8::Context>, v8::FunctionCallback, v8::Local<v8::Value>, int, v8::ConstructorBehavior, v8::SideEffectType)’
          33 |       Local<Context> context, FunctionCallback callback,
             |       ~~~~~~~~~~~~~~~^~~~~~~
       In file included from ../node_modules/nan/nan_new.h:189,
                        from ../node_modules/nan/nan.h:203,
                        from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::StringObject>::return_t Nan::imp::Factory<v8::StringObject>::New(v8::Local<v8::String>)’:
       ../node_modules/nan/nan_implementation_12_inl.h:337:31: error: no matching function for call to ‘v8::StringObject::New(v8::Local<v8::String>&)’
         337 |   return v8::StringObject::New(value).As<v8::StringObject>();
             |          ~~~~~~~~~~~~~~~~~~~~~^~~~~~~
       In file included from /app/.cache/node-gyp/18.12.1/include/node/v8.h:47,
                        from /app/.cache/node-gyp/18.12.1/include/node/node.h:73,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/18.12.1/include/node/v8-primitive-object.h:81:23: note: candidate: ‘static v8::Local<v8::Value> v8::StringObject::New(v8::Isolate*, v8::Local<v8::String>)’
          81 |   static Local<Value> New(Isolate* isolate, Local<String> value);
             |                       ^~~
       /app/.cache/node-gyp/18.12.1/include/node/v8-primitive-object.h:81:23: note:   candidate expects 2 arguments, 1 provided
       In file included from ../node_modules/nan/nan_new.h:189,
                        from ../node_modules/nan/nan.h:203,
                        from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan_implementation_12_inl.h:337:58: error: expected primary-expression before ‘>’ token
         337 |   return v8::StringObject::New(value).As<v8::StringObject>();
             |                                                          ^
       ../node_modules/nan/nan_implementation_12_inl.h:337:60: error: expected primary-expression before ‘)’ token
         337 |   return v8::StringObject::New(value).As<v8::StringObject>();
             |                                                            ^
       In file included from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Local<v8::Value>)’:
       ../node_modules/nan/nan.h:1034:52: error: no matching function for call to ‘v8::Value::ToString()’
        1034 |       v8::Local<v8::String> string = from->ToString();
             |                                      ~~~~~~~~~~~~~~^~
       In file included from /app/.cache/node-gyp/18.12.1/include/node/v8-primitive.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-array-buffer.h:13,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8.h:24,
                        from /app/.cache/node-gyp/18.12.1/include/node/node.h:73,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/18.12.1/include/node/v8-value.h:360:44: note: candidate: ‘v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const’
         360 |   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
             |                                            ^~~~~~~~
       /app/.cache/node-gyp/18.12.1/include/node/v8-value.h:360:44: note:   candidate expects 1 argument, 0 provided
       In file included from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan.h:1044:37: error: cannot convert ‘char*’ to ‘v8::Isolate*’
        1044 |         length_ = string->WriteUtf8(str_, static_cast<int>(len), 0, flags);
             |                                     ^~~~
             |                                     |
             |                                     char*
       In file included from /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-array-buffer.h:13,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8.h:24,
                        from /app/.cache/node-gyp/18.12.1/include/node/node.h:73,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/18.12.1/include/node/v8-primitive.h:202:26: note:   initializing argument 1 of ‘int v8::String::WriteUtf8(v8::Isolate*, char*, int, int*, int) const’
         202 |   int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
             |                 ~~~~~~~~~^~~~~~~
       In file included from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan.h: In member function ‘void Nan::AsyncWorker::SaveToPersistent(const char*, const v8::Local<v8::Value>&)’:
       ../node_modules/nan/nan.h:1818:31: error: no matching function for call to ‘v8::Object::Set(v8::Local<v8::String>, const v8::Local<v8::Value>&)’
        1818 |     New(persistentHandle)->Set(New(key).ToLocalChecked(), value);
             |     ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       In file included from /app/.cache/node-gyp/18.12.1/include/node/v8-array-buffer.h:13,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8.h:24,
                        from /app/.cache/node-gyp/18.12.1/include/node/node.h:73,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:244:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
         244 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
             |                                     ^~~
       /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:244:37: note:   candidate expects 3 arguments, 2 provided
       /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:247:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
         247 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
             |                                     ^~~
       /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:247:37: note:   candidate expects 3 arguments, 2 provided
       In file included from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan.h: In member function ‘void Nan::AsyncWorker::SaveToPersistent(const v8::Local<v8::String>&, const v8::Local<v8::Value>&)’:
       ../node_modules/nan/nan.h:1824:31: error: no matching function for call to ‘v8::Object::Set(const v8::Local<v8::String>&, const v8::Local<v8::Value>&)’
        1824 |     New(persistentHandle)->Set(key, value);
             |     ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
       In file included from /app/.cache/node-gyp/18.12.1/include/node/v8-array-buffer.h:13,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8.h:24,
                        from /app/.cache/node-gyp/18.12.1/include/node/node.h:73,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:244:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
         244 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
             |                                     ^~~
       /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:244:37: note:   candidate expects 3 arguments, 2 provided
       /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:247:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
         247 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
             |                                     ^~~
       /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:247:37: note:   candidate expects 3 arguments, 2 provided
       In file included from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan.h: In member function ‘void Nan::AsyncWorker::SaveToPersistent(uint32_t, const v8::Local<v8::Value>&)’:
       ../node_modules/nan/nan.h:1830:31: error: no matching function for call to ‘v8::Object::Set(uint32_t&, const v8::Local<v8::Value>&)’
        1830 |     New(persistentHandle)->Set(index, value);
             |     ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
       In file included from /app/.cache/node-gyp/18.12.1/include/node/v8-array-buffer.h:13,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8.h:24,
                        from /app/.cache/node-gyp/18.12.1/include/node/node.h:73,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:244:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
         244 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
             |                                     ^~~
       /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:244:37: note:   candidate expects 3 arguments, 2 provided
       /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:247:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
         247 |   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
             |                                     ^~~
       /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:247:37: note:   candidate expects 3 arguments, 2 provided
       In file included from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::AsyncWorker::GetFromPersistent(const char*) const’:
       ../node_modules/nan/nan.h:1836:35: error: no matching function for call to ‘v8::Object::Get(v8::Local<v8::String>)’
        1836 |         New(persistentHandle)->Get(New(key).ToLocalChecked()));
             |         ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
       In file included from /app/.cache/node-gyp/18.12.1/include/node/v8-array-buffer.h:13,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8.h:24,
                        from /app/.cache/node-gyp/18.12.1/include/node/node.h:73,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:290:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
         290 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
             |                                           ^~~
       /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:290:43: note:   candidate expects 2 arguments, 1 provided
       /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:293:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
         293 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
             |                                           ^~~
       /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:293:43: note:   candidate expects 2 arguments, 1 provided
       In file included from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::AsyncWorker::GetFromPersistent(const v8::Local<v8::String>&) const’:
       ../node_modules/nan/nan.h:1842:51: error: no matching function for call to ‘v8::Object::Get(const v8::Local<v8::String>&)’
        1842 |     return scope.Escape(New(persistentHandle)->Get(key));
             |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
       In file included from /app/.cache/node-gyp/18.12.1/include/node/v8-array-buffer.h:13,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8.h:24,
                        from /app/.cache/node-gyp/18.12.1/include/node/node.h:73,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:290:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
         290 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
             |                                           ^~~
       /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:290:43: note:   candidate expects 2 arguments, 1 provided
       /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:293:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
         293 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
             |                                           ^~~
       /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:293:43: note:   candidate expects 2 arguments, 1 provided
       In file included from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::AsyncWorker::GetFromPersistent(uint32_t) const’:
       ../node_modules/nan/nan.h:1847:51: error: no matching function for call to ‘v8::Object::Get(uint32_t&)’
        1847 |     return scope.Escape(New(persistentHandle)->Get(index));
             |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
       In file included from /app/.cache/node-gyp/18.12.1/include/node/v8-array-buffer.h:13,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8.h:24,
                        from /app/.cache/node-gyp/18.12.1/include/node/node.h:73,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:290:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
         290 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
             |                                           ^~~
       /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:290:43: note:   candidate expects 2 arguments, 1 provided
       /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:293:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
         293 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
             |                                           ^~~
       /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:293:43: note:   candidate expects 2 arguments, 1 provided
       In file included from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
       ../node_modules/nan/nan.h:2167:7: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
        2167 |     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
             |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       ../node_modules/nan/nan.h: In function ‘void Nan::SetAccessor(v8::Local<v8::ObjectTemplate>, v8::Local<v8::String>, Nan::GetterCallback, Nan::SetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, Nan::imp::Sig)’:
       ../node_modules/nan/nan.h:2405:19: warning: ‘void v8::ObjectTemplate::SetAccessor(v8::Local<v8::Name>, v8::AccessorNameGetterCallback, v8::AccessorNameSetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, v8::Local<v8::AccessorSignature>, v8::SideEffectType, v8::SideEffectType)’ is deprecated: Do signature check in accessor [-Wdeprecated-declarations]
        2405 |   tpl->SetAccessor(
             |   ~~~~~~~~~~~~~~~~^
        2406 |       name
             |       ~~~~         
        2407 |     , getter_
             |     ~~~~~~~~~      
        2408 |     , setter_
             |     ~~~~~~~~~      
        2409 |     , obj
             |     ~~~~~          
        2410 |     , settings
             |     ~~~~~~~~~~     
        2411 |     , attribute
             |     ~~~~~~~~~~~    
        2412 |     , signature);
             |     ~~~~~~~~~~~~   
       In file included from /app/.cache/node-gyp/18.12.1/include/node/v8-function.h:15,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8.h:33,
                        from /app/.cache/node-gyp/18.12.1/include/node/node.h:73,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/18.12.1/include/node/v8-template.h:838:8: note: declared here
         838 |   void SetAccessor(
             |        ^~~~~~~~~~~
       In file included from /usr/include/c++/11/cassert:44,
                        from /app/.cache/node-gyp/18.12.1/include/node/node_object_wrap.h:26,
                        from ../node_modules/nan/nan.h:53,
                        from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan_object_wrap.h: In destructor ‘virtual Nan::ObjectWrap::~ObjectWrap()’:
       ../node_modules/nan/nan_object_wrap.h:24:25: error: ‘class Nan::Persistent<v8::Object>’ has no member named ‘IsNearDeath’
          24 |     assert(persistent().IsNearDeath());
             |                         ^~~~~~~~~~~
       In file included from ../node_modules/nan/nan.h:2657,
                        from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan_object_wrap.h: In member function ‘void Nan::ObjectWrap::MakeWeak()’:
       ../node_modules/nan/nan_object_wrap.h:67:18: error: ‘class Nan::Persistent<v8::Object>’ has no member named ‘MarkIndependent’
          67 |     persistent().MarkIndependent();
             |                  ^~~~~~~~~~~~~~~
       In file included from /usr/include/c++/11/cassert:44,
                        from /app/.cache/node-gyp/18.12.1/include/node/node_object_wrap.h:26,
                        from ../node_modules/nan/nan.h:53,
                        from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan_object_wrap.h: In static member function ‘static void Nan::ObjectWrap::WeakCallback(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’:
       ../node_modules/nan/nan_object_wrap.h:124:26: error: ‘class Nan::Persistent<v8::Object>’ has no member named ‘IsNearDeath’
         124 |     assert(wrap->handle_.IsNearDeath());
             |                          ^~~~~~~~~~~
       In file included from ../node_modules/nan/nan.h:2753,
                        from ../src/bcrypt_node.cc:1:
       ../node_modules/nan/nan_typedarray_contents.h: In constructor ‘Nan::TypedArrayContents<T>::TypedArrayContents(v8::Local<v8::Value>)’:
       ../node_modules/nan/nan_typedarray_contents.h:34:43: error: ‘class v8::ArrayBuffer’ has no member named ‘GetContents’
          34 |       data   = static_cast<char*>(buffer->GetContents().Data()) + byte_offset;
             |                                           ^~~~~~~~~~~
       ../src/bcrypt_node.cc: In function ‘char {anonymous}::ToCharVersion(v8::Local<v8::String>)’:
       ../src/bcrypt_node.cc:66:30: error: no matching function for call to ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::String>&)’
          66 |   String::Utf8Value value(str);
             |                              ^
       In file included from /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-array-buffer.h:13,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8.h:24,
                        from /app/.cache/node-gyp/18.12.1/include/node/node.h:73,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/18.12.1/include/node/v8-primitive.h:510:5: note: candidate: ‘v8::String::Utf8Value::Utf8Value(v8::Isolate*, v8::Local<v8::Value>)’
         510 |     Utf8Value(Isolate* isolate, Local<v8::Value> obj);
             |     ^~~~~~~~~
       /app/.cache/node-gyp/18.12.1/include/node/v8-primitive.h:510:5: note:   candidate expects 2 arguments, 1 provided
       ../src/bcrypt_node.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::GenerateSalt(Nan::NAN_METHOD_ARGS_TYPE)’:
       ../src/bcrypt_node.cc:121:59: error: no matching function for call to ‘v8::Value::ToString()’
         121 |     const char minor_ver = ToCharVersion(info[0]->ToString());
             |                                          ~~~~~~~~~~~~~~~~~^~
       In file included from /app/.cache/node-gyp/18.12.1/include/node/v8-primitive.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-array-buffer.h:13,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8.h:24,
                        from /app/.cache/node-gyp/18.12.1/include/node/node.h:73,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/18.12.1/include/node/v8-value.h:360:44: note: candidate: ‘v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const’
         360 |   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
             |                                            ^~~~~~~~
       /app/.cache/node-gyp/18.12.1/include/node/v8-value.h:360:44: note:   candidate expects 1 argument, 0 provided
       ../src/bcrypt_node.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::GenerateSaltSync(Nan::NAN_METHOD_ARGS_TYPE)’:
       ../src/bcrypt_node.cc:150:59: error: no matching function for call to ‘v8::Value::ToString()’
         150 |     const char minor_ver = ToCharVersion(info[0]->ToString());
             |                                          ~~~~~~~~~~~~~~~~~^~
       In file included from /app/.cache/node-gyp/18.12.1/include/node/v8-primitive.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-array-buffer.h:13,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8.h:24,
                        from /app/.cache/node-gyp/18.12.1/include/node/node.h:73,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/18.12.1/include/node/v8-value.h:360:44: note: candidate: ‘v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const’
         360 |   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
             |                                            ^~~~~~~~
       /app/.cache/node-gyp/18.12.1/include/node/v8-value.h:360:44: note:   candidate expects 1 argument, 0 provided
       ../src/bcrypt_node.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Encrypt(Nan::NAN_METHOD_ARGS_TYPE)’:
       ../src/bcrypt_node.cc:212:43: error: no matching function for call to ‘v8::Value::ToString()’
         212 |     Nan::Utf8String data(info[0]->ToString());
             |                          ~~~~~~~~~~~~~~~~~^~
       In file included from /app/.cache/node-gyp/18.12.1/include/node/v8-primitive.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-array-buffer.h:13,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8.h:24,
                        from /app/.cache/node-gyp/18.12.1/include/node/node.h:73,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/18.12.1/include/node/v8-value.h:360:44: note: candidate: ‘v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const’
         360 |   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
             |                                            ^~~~~~~~
       /app/.cache/node-gyp/18.12.1/include/node/v8-value.h:360:44: note:   candidate expects 1 argument, 0 provided
       ../src/bcrypt_node.cc:213:43: error: no matching function for call to ‘v8::Value::ToString()’
         213 |     Nan::Utf8String salt(info[1]->ToString());
             |                          ~~~~~~~~~~~~~~~~~^~
       In file included from /app/.cache/node-gyp/18.12.1/include/node/v8-primitive.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-array-buffer.h:13,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8.h:24,
                        from /app/.cache/node-gyp/18.12.1/include/node/node.h:73,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/18.12.1/include/node/v8-value.h:360:44: note: candidate: ‘v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const’
         360 |   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
             |                                            ^~~~~~~~
       /app/.cache/node-gyp/18.12.1/include/node/v8-value.h:360:44: note:   candidate expects 1 argument, 0 provided
       ../src/bcrypt_node.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::EncryptSync(Nan::NAN_METHOD_ARGS_TYPE)’:
       ../src/bcrypt_node.cc:231:43: error: no matching function for call to ‘v8::Value::ToString()’
         231 |     Nan::Utf8String data(info[0]->ToString());
             |                          ~~~~~~~~~~~~~~~~~^~
       In file included from /app/.cache/node-gyp/18.12.1/include/node/v8-primitive.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-array-buffer.h:13,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8.h:24,
                        from /app/.cache/node-gyp/18.12.1/include/node/node.h:73,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/18.12.1/include/node/v8-value.h:360:44: note: candidate: ‘v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const’
         360 |   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
             |                                            ^~~~~~~~
       /app/.cache/node-gyp/18.12.1/include/node/v8-value.h:360:44: note:   candidate expects 1 argument, 0 provided
       ../src/bcrypt_node.cc:232:43: error: no matching function for call to ‘v8::Value::ToString()’
         232 |     Nan::Utf8String salt(info[1]->ToString());
             |                          ~~~~~~~~~~~~~~~~~^~
       In file included from /app/.cache/node-gyp/18.12.1/include/node/v8-primitive.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-array-buffer.h:13,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8.h:24,
                        from /app/.cache/node-gyp/18.12.1/include/node/node.h:73,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/18.12.1/include/node/v8-value.h:360:44: note: candidate: ‘v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const’
         360 |   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
             |                                            ^~~~~~~~
       /app/.cache/node-gyp/18.12.1/include/node/v8-value.h:360:44: note:   candidate expects 1 argument, 0 provided
       ../src/bcrypt_node.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Compare(Nan::NAN_METHOD_ARGS_TYPE)’:
       ../src/bcrypt_node.cc:312:44: error: no matching function for call to ‘v8::Value::ToString()’
         312 |     Nan::Utf8String input(info[0]->ToString());
             |                           ~~~~~~~~~~~~~~~~~^~
       In file included from /app/.cache/node-gyp/18.12.1/include/node/v8-primitive.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-array-buffer.h:13,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8.h:24,
                        from /app/.cache/node-gyp/18.12.1/include/node/node.h:73,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/18.12.1/include/node/v8-value.h:360:44: note: candidate: ‘v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const’
         360 |   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
             |                                            ^~~~~~~~
       /app/.cache/node-gyp/18.12.1/include/node/v8-value.h:360:44: note:   candidate expects 1 argument, 0 provided
       ../src/bcrypt_node.cc:313:48: error: no matching function for call to ‘v8::Value::ToString()’
         313 |     Nan::Utf8String encrypted(info[1]->ToString());
             |                               ~~~~~~~~~~~~~~~~~^~
       In file included from /app/.cache/node-gyp/18.12.1/include/node/v8-primitive.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-array-buffer.h:13,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8.h:24,
                        from /app/.cache/node-gyp/18.12.1/include/node/node.h:73,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/18.12.1/include/node/v8-value.h:360:44: note: candidate: ‘v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const’
         360 |   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
             |                                            ^~~~~~~~
       /app/.cache/node-gyp/18.12.1/include/node/v8-value.h:360:44: note:   candidate expects 1 argument, 0 provided
       ../src/bcrypt_node.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::CompareSync(Nan::NAN_METHOD_ARGS_TYPE)’:
       ../src/bcrypt_node.cc:331:41: error: no matching function for call to ‘v8::Value::ToString()’
         331 |     Nan::Utf8String pw(info[0]->ToString());
             |                        ~~~~~~~~~~~~~~~~~^~
       In file included from /app/.cache/node-gyp/18.12.1/include/node/v8-primitive.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-array-buffer.h:13,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8.h:24,
                        from /app/.cache/node-gyp/18.12.1/include/node/node.h:73,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/18.12.1/include/node/v8-value.h:360:44: note: candidate: ‘v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const’
         360 |   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
             |                                            ^~~~~~~~
       /app/.cache/node-gyp/18.12.1/include/node/v8-value.h:360:44: note:   candidate expects 1 argument, 0 provided
       ../src/bcrypt_node.cc:332:43: error: no matching function for call to ‘v8::Value::ToString()’
         332 |     Nan::Utf8String hash(info[1]->ToString());
             |                          ~~~~~~~~~~~~~~~~~^~
       In file included from /app/.cache/node-gyp/18.12.1/include/node/v8-primitive.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-array-buffer.h:13,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8.h:24,
                        from /app/.cache/node-gyp/18.12.1/include/node/node.h:73,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/18.12.1/include/node/v8-value.h:360:44: note: candidate: ‘v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const’
         360 |   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
             |                                            ^~~~~~~~
       /app/.cache/node-gyp/18.12.1/include/node/v8-value.h:360:44: note:   candidate expects 1 argument, 0 provided
       ../src/bcrypt_node.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::GetRounds(Nan::NAN_METHOD_ARGS_TYPE)’:
       ../src/bcrypt_node.cc:352:43: error: no matching function for call to ‘v8::Value::ToString()’
         352 |     Nan::Utf8String hash(info[0]->ToString());
             |                          ~~~~~~~~~~~~~~~~~^~
       In file included from /app/.cache/node-gyp/18.12.1/include/node/v8-primitive.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-object.h:11,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8-array-buffer.h:13,
                        from /app/.cache/node-gyp/18.12.1/include/node/v8.h:24,
                        from /app/.cache/node-gyp/18.12.1/include/node/node.h:73,
                        from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       /app/.cache/node-gyp/18.12.1/include/node/v8-value.h:360:44: note: candidate: ‘v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const’
         360 |   V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
             |                                            ^~~~~~~~
       /app/.cache/node-gyp/18.12.1/include/node/v8-value.h:360:44: note:   candidate expects 1 argument, 0 provided
       In file included from ../node_modules/nan/nan.h:51,
                        from ../src/bcrypt_node.cc:1:
       ../src/bcrypt_node.cc: At global scope:
       /app/.cache/node-gyp/18.12.1/include/node/node.h:976:7: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
         976 |       (node::addon_register_func) (regfunc),                          \\\n      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       /app/.cache/node-gyp/18.12.1/include/node/node.h:1010:3: note: in expansion of macro ‘NODE_MODULE_X’
        1010 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
             |   ^~~~~~~~~~~~~
       ../src/bcrypt_node.cc:375:1: note: in expansion of macro ‘NODE_MODULE’
         375 | NODE_MODULE(bcrypt_lib, init);
             | ^~~~~~~~~~~
       ../src/bcrypt_node.cc:65:6: warning: ‘char {anonymous}::ToCharVersion(v8::Local<v8::String>)’ defined but not used [-Wunused-function]
          65 | char ToCharVersion(Local<String> str) {
             |      ^~~~~~~~~~~~~
       make: *** [bcrypt_lib.target.mk:115: Release/obj.target/bcrypt_lib/src/bcrypt_node.o] Error 1
       make: Leaving directory '/tmp/build_e80a8a40/node_modules/bcrypt/build'
       gyp ERR! build error 
       gyp ERR! stack Error: `make` failed with exit code: 2
       gyp ERR! stack     at ChildProcess.onExit (/tmp/build_e80a8a40/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23)
       gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
       gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
       gyp ERR! System Linux 4.4.0-1104-aws
       gyp ERR! command \"/tmp/build_e80a8a40/.heroku/node/bin/node\" \"/tmp/build_e80a8a40/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"build\" \"--fallback-to-build\" \"--module=/tmp/build_e80a8a40/node_modules/bcrypt/lib/binding/bcrypt_lib.node\" \"--module_name=bcrypt_lib\" \"--module_path=/tmp/build_e80a8a40/node_modules/bcrypt/lib/binding\" \"--napi_version=8\" \"--node_abi_napi=napi\"
       gyp ERR! cwd /tmp/build_e80a8a40/node_modules/bcrypt
       gyp ERR! node -v v18.12.1
       gyp ERR! node-gyp -v v9.4.0
       gyp ERR! not ok 
       node-pre-gyp ERR! build error 
       node-pre-gyp ERR! stack Error: Failed to execute '/tmp/build_e80a8a40/.heroku/node/bin/node /tmp/build_e80a8a40/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/tmp/build_e80a8a40/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/tmp/build_e80a8a40/node_modules/bcrypt/lib/binding --napi_version=8 --node_abi_napi=napi' (1)
       node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/tmp/build_e80a8a40/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
       node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
       node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1091:16)
       node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:302:5)
       node-pre-gyp ERR! System Linux 4.4.0-1104-aws
       node-pre-gyp ERR! command \"/tmp/build_e80a8a40/.heroku/node/bin/node\" \"/tmp/build_e80a8a40/node_modules/bcrypt/node_modules/.bin/node-pre-gyp\" \"install\" \"--fallback-to-build\"
       node-pre-gyp ERR! cwd /tmp/build_e80a8a40/node_modules/bcrypt
       node-pre-gyp ERR! node -v v18.12.1
       node-pre-gyp ERR! node-pre-gyp -v v0.10.2
       node-pre-gyp ERR! not ok 
       Failed to execute '/tmp/build_e80a8a40/.heroku/node/bin/node /tmp/build_e80a8a40/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/tmp/build_e80a8a40/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/tmp/build_e80a8a40/node_modules/bcrypt/lib/binding --napi_version=8 --node_abi_napi=napi' (1)"
       info This module is OPTIONAL, you can safely ignore this error
-----> Build failed
       
       We're sorry this build is failing! You can troubleshoot common issues here:
       https://devcenter.heroku.com/articles/troubleshooting-node-deploys
       
       If you're stuck, please submit a ticket so we can help:
       https://help.heroku.com/
       
       Love,
       Heroku
       
 !     Push rejected, failed to compile Node.js app.
 !     Push failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HEIC plate extraction is slow License plate extraction doesn't work on HEIC files
1 participant