awslabs/aws-crt-nodejs

npm install for aws-crt-nodejs fails with CMake Error

Closed this issue · 1 comments

Describe the bug

npm install for aws-crt-nodejs fails with CMake Error

Not searching for unused variables given on the command line.
-- The C compiler identification is AppleClang 13.1.6.13160021
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Using submodule dependencies
CMake Error at CMakeLists.txt:38 (include):
  include could not find requested file:

    AwsFindPackage


CMake Error at CMakeLists.txt:44 (add_subdirectory):
  The source directory

    /Users/trivikr/workspace/aws-crt-nodejs/crt/aws-c-common

  does not contain a CMakeLists.txt file.


CMake Error at CMakeLists.txt:55 (add_subdirectory):
  The source directory

    /Users/trivikr/workspace/aws-crt-nodejs/crt/aws-c-sdkutils

  does not contain a CMakeLists.txt file.


CMake Error at CMakeLists.txt:56 (add_subdirectory):
  The source directory

    /Users/trivikr/workspace/aws-crt-nodejs/crt/aws-c-io

  does not contain a CMakeLists.txt file.


CMake Error at CMakeLists.txt:57 (add_subdirectory):
  The source directory

    /Users/trivikr/workspace/aws-crt-nodejs/crt/aws-c-cal

  does not contain a CMakeLists.txt file.


CMake Error at CMakeLists.txt:58 (add_subdirectory):
  The source directory

    /Users/trivikr/workspace/aws-crt-nodejs/crt/aws-c-compression

  does not contain a CMakeLists.txt file.


CMake Error at CMakeLists.txt:59 (add_subdirectory):
  The source directory

    /Users/trivikr/workspace/aws-crt-nodejs/crt/aws-c-http

  does not contain a CMakeLists.txt file.


CMake Error at CMakeLists.txt:60 (add_subdirectory):
  The source directory

    /Users/trivikr/workspace/aws-crt-nodejs/crt/aws-c-auth

  does not contain a CMakeLists.txt file.


CMake Error at CMakeLists.txt:61 (add_subdirectory):
  The source directory

    /Users/trivikr/workspace/aws-crt-nodejs/crt/aws-c-mqtt

  does not contain a CMakeLists.txt file.


CMake Error at CMakeLists.txt:62 (add_subdirectory):
  The source directory

    /Users/trivikr/workspace/aws-crt-nodejs/crt/aws-checksums

  does not contain a CMakeLists.txt file.


CMake Error at CMakeLists.txt:76 (include):
  include could not find requested file:

    AwsCFlags


CMake Error at CMakeLists.txt:77 (include):
  include could not find requested file:

    AwsSharedLibSetup


CMake Error at CMakeLists.txt:78 (include):
  include could not find requested file:

    AwsSanitizers


CMake Error at CMakeLists.txt:85 (aws_set_common_properties):
  Unknown CMake command "aws_set_common_properties".


-- Configuring incomplete, errors occurred!
See also "/Users/trivikr/workspace/aws-crt-nodejs/build/darwin-x64/CMakeFiles/CMakeOutput.log".
See also "/Users/trivikr/workspace/aws-crt-nodejs/build/darwin-x64/CMakeFiles/CMakeError.log".
ERR! OMG Process terminated: 1
node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^

Error: Process terminated: 1
    at ChildProcess.<anonymous> (/Users/trivikr/workspace/aws-crt-nodejs/node_modules/cmake-js/lib/processHelpers.js:34:32)
    at ChildProcess.emit (node:events:527:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! code 1
npm ERR! path /Users/trivikr/workspace/aws-crt-nodejs
npm ERR! command failed
npm ERR! command sh -c node ./scripts/install.js --production

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/trivikr/.npm/_logs/2022-07-12T21_59_13_087Z-debug-0.log

Steps to reproduce

git clone aws-crt-nodejs, and run npm install

Observed behavior

npm install fails.

Expected behavior

Either npm install is successful, or instructions are added in https://github.com/awslabs/aws-crt-nodejs/blob/main/CONTRIBUTING.md

Additional context

The missing step git submodule update --init is mentioned in root-level README.md

https://github.com/awslabs/aws-crt-nodejs/blob/main/README.md#building-the-package