Skip to content

Commit 595c68a

Browse files
committed
Add clear message when npm install was not run.
1 parent 688ae06 commit 595c68a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ if(NOT CMAKE_JS_INC)
1111
setup_cmakejs()
1212
endif ()
1313

14+
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/node_modules)
15+
message(FATAL_ERROR "You must run 'npm install' in order for NAPI to be available")
16+
endif()
17+
1418
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
1519

1620
if(MSVC AND CMAKE_JS_NODELIB_DEF AND CMAKE_JS_NODELIB_TARGET)

0 commit comments

Comments
 (0)