diff --git a/doc/dev/developer_guide/dash-devel.rst b/doc/dev/developer_guide/dash-devel.rst index cbeead788eb69..1277cecc552f7 100644 --- a/doc/dev/developer_guide/dash-devel.rst +++ b/doc/dev/developer_guide/dash-devel.rst @@ -214,8 +214,8 @@ The build process is based on `Node.js `_ and requires the Prerequisites ~~~~~~~~~~~~~ - * Node 16.20.0 or higher - * NPM 6.14.9 or higher + * Node 18.17.0 or higher + * NPM 9.6.7 or higher nodeenv: During Ceph's build we create a virtualenv with ``node`` and ``npm`` diff --git a/make-dist b/make-dist index 0ed52e5736449..f69a969ada0c6 100755 --- a/make-dist +++ b/make-dist @@ -132,7 +132,7 @@ build_dashboard_frontend() { $CURR_DIR/src/tools/setup-virtualenv.sh $TEMP_DIR $TEMP_DIR/bin/pip install nodeenv - $TEMP_DIR/bin/nodeenv --verbose -p --node=16.20.1 + $TEMP_DIR/bin/nodeenv --verbose -p --node=18.17.0 cd src/pybind/mgr/dashboard/frontend . $TEMP_DIR/bin/activate diff --git a/src/pybind/mgr/dashboard/frontend/CMakeLists.txt b/src/pybind/mgr/dashboard/frontend/CMakeLists.txt index 78ba7620d589b..2527ef23e85e5 100644 --- a/src/pybind/mgr/dashboard/frontend/CMakeLists.txt +++ b/src/pybind/mgr/dashboard/frontend/CMakeLists.txt @@ -40,6 +40,7 @@ function(add_npm_options) npm config set ${key} ${value} --userconfig ${NC_NODEENV_DIR}/.npmrc && deactivate) endforeach() + set(npm_config_python ${MGR_PYTHON_EXECUTABLE}) add_custom_target(${NC_TARGET} ${commands} DEPENDS ${NC_NODEENV_DIR}/bin/npm @@ -63,7 +64,7 @@ else(WITH_SYSTEM_NPM) OUTPUT "${mgr-dashboard-nodeenv-dir}/bin/npm" COMMAND ${CMAKE_SOURCE_DIR}/src/tools/setup-virtualenv.sh --python=${MGR_PYTHON_EXECUTABLE} ${mgr-dashboard-nodeenv-dir} COMMAND ${mgr-dashboard-nodeenv-dir}/bin/pip install nodeenv - COMMAND ${mgr-dashboard-nodeenv-dir}/bin/nodeenv --verbose ${node_mirror_opt} -p --node=16.20.1 + COMMAND ${mgr-dashboard-nodeenv-dir}/bin/nodeenv --verbose ${node_mirror_opt} -p --node=18.17.0 COMMAND mkdir ${mgr-dashboard-nodeenv-dir}/.npm WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "dashboard nodeenv is being installed") @@ -73,7 +74,6 @@ else(WITH_SYSTEM_NPM) add_npm_options( NODEENV_DIR ${mgr-dashboard-nodeenv-dir} TARGET mgr-dashboard-nodeenv - OPTION python=${MGR_PYTHON_EXECUTABLE} OPTION cache=${mgr-dashboard-nodeenv-dir}/.npm ${npm_registry_opts}) add_custom_target(mgr-dashboard-frontend-deps