yzhan298 / ceph

Ceph is a distributed object, block, and file storage platform
http://ceph.com
Other
0 stars 0 forks source link

dashboard make issue - npm ERR #6

Closed yzhan298 closed 4 years ago

yzhan298 commented 4 years ago

cp src/environments/environment.tpl.ts src/environments/environment.prod.ts && cp src/environments/environment.tpl.ts src/environments/environment.ts && node ./environment.build.js

Environment variables have been set sh: 1: ng: not found npm ERR! file sh npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn npm ERR! ceph-dashboard@0.0.0 build: npm run env_build && ng build "--progress=false" npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the ceph-dashboard@0.0.0 build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/yzhan298/.npm/_logs/2019-11-17T17_53_47_806Z-debug.log src/pybind/mgr/dashboard/CMakeFiles/mgr-dashboard-frontend-build.dir/build.make:729: recipe for target '../src/pybind/mgr/dashboard/frontend/dist' failed make[2]: [../src/pybind/mgr/dashboard/frontend/dist] Error 1 CMakeFiles/Makefile2:4057: recipe for target 'src/pybind/mgr/dashboard/CMakeFiles/mgr-dashboard-frontend-build.dir/all' failed make[1]: [src/pybind/mgr/dashboard/CMakeFiles/mgr-dashboard-frontend-build.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 6%] Building CXX object CMakeFiles/rocksdb.dir/db/db_impl_write.cc.o

yzhan298 commented 4 years ago

Solution:

  1. update nodejs: curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash - sudo apt-get install -y nodejs

  2. update npm: sudo apt install aptitude sudo aptitude install npm

  3. update dashboard directory: cd /src/ceph-int/build/src/pybind/mgr/dashboard/frontend npm install npm run build -- --prod

DONE