Bug #23895
closedcmake failed in compiling dashboard
Added by huang jun about 6 years ago. Updated about 3 years ago.
0%
Description
dashboard frontend is being created > ceph-dashboard@0.0.0 build /usr/src/ceph/src/pybind/mgr/dashboard/frontend > ng build "--prod" You seem to not be depending on "@angular/core". This is an error. npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! ceph-dashboard@0.0.0 build: `ng build "--prod"` npm ERR! Exit status 2 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! /root/.npm/_logs/2018-04-27T01_02_15_946Z-debug.log make[2]: *** [../src/pybind/mgr/dashboard/frontend/dist] Error 2 make[1]: *** [src/pybind/mgr/dashboard/CMakeFiles/mgr-dashboard-frontend-build.dir/all] Error 2 make: *** [all] Error 2
Updated by huang jun about 6 years ago
cat /root/.npm/_logs/2018-04-27T01_02_15_946Z-debug.log
0 info it worked if it ends with ok 1 verbose cli [ '/usr/src/ceph/build/src/pybind/mgr/dashboard/node-env/bin/node', 1 verbose cli '/usr/src/ceph/build/src/pybind/mgr/dashboard/node-env/bin/npm', 1 verbose cli 'run', 1 verbose cli 'build', 1 verbose cli '--', 1 verbose cli '--prod' ] 2 info using npm@5.6.0 3 info using node@v8.10.0 4 verbose run-script [ 'prebuild', 'build', 'postbuild' ] 5 info lifecycle ceph-dashboard@0.0.0~prebuild: ceph-dashboard@0.0.0 6 info lifecycle ceph-dashboard@0.0.0~build: ceph-dashboard@0.0.0 7 verbose lifecycle ceph-dashboard@0.0.0~build: unsafe-perm in lifecycle true 8 verbose lifecycle ceph-dashboard@0.0.0~build: PATH: /usr/src/ceph/build/src/pybind/mgr/dashboard/node-env/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/usr/src/ceph/src/pybind/mgr/dashboard/frontend/node_modules/.bin:/usr/src/ceph/build/src/pybind/mgr/dashboard/node-env/lib/node_modules/.bin:/usr/src/ceph/build/src/pybind/mgr/dashboard/node-env/bin:/usr/src/ceph/build/src/pybind/mgr/dashboard/node-env/bin:/opt/rh/devtoolset-7/root/usr/bin:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin 9 verbose lifecycle ceph-dashboard@0.0.0~build: CWD: /usr/src/ceph/src/pybind/mgr/dashboard/frontend 10 silly lifecycle ceph-dashboard@0.0.0~build: Args: [ '-c', 'ng build "--prod"' ] 11 silly lifecycle ceph-dashboard@0.0.0~build: Returned: code: 2 signal: null 12 info lifecycle ceph-dashboard@0.0.0~build: Failed to exec build script 13 verbose stack Error: ceph-dashboard@0.0.0 build: `ng build "--prod"` 13 verbose stack Exit status 2 13 verbose stack at EventEmitter.<anonymous> (/usr/src/ceph/build/src/pybind/mgr/dashboard/node-env/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16) 13 verbose stack at emitTwo (events.js:126:13) 13 verbose stack at EventEmitter.emit (events.js:214:7) 13 verbose stack at ChildProcess.<anonymous> (/usr/src/ceph/build/src/pybind/mgr/dashboard/node-env/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at emitTwo (events.js:126:13) 13 verbose stack at ChildProcess.emit (events.js:214:7) 13 verbose stack at maybeClose (internal/child_process.js:925:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) 14 verbose pkgid ceph-dashboard@0.0.0 15 verbose cwd /usr/src/ceph/src/pybind/mgr/dashboard/frontend 16 verbose Linux 3.10.0-327.el7.x86_64 17 verbose argv "/usr/src/ceph/build/src/pybind/mgr/dashboard/node-env/bin/node" "/usr/src/ceph/build/src/pybind/mgr/dashboard/node-env/bin/npm" "run" "build" "--" "--prod" 18 verbose node v8.10.0 19 verbose npm v5.6.0 20 error code ELIFECYCLE 21 error errno 2 22 error ceph-dashboard@0.0.0 build: `ng build "--prod"` 22 error Exit status 2 23 error Failed at the ceph-dashboard@0.0.0 build script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 2, true ]
Updated by Nathan Cutler about 6 years ago
- Project changed from Ceph to mgr
- Category changed from build to 132
Updated by Ricardo Dias about 6 years ago
Can you give more details about you environment? OS distro and version?
Updated by Stephan Müller about 6 years ago
Does the following work for you to build it manually?
cd /usr/src/ceph/build/src/pybind/mgr/dashboard/frontend; npm install; npm run build -- --prod
Updated by huang jun about 6 years ago
[root@huangjun /usr/src/ceph-int/build]$ lsb_release -a │ LSB Version: :core-4.1-amd64:core-4.1-noarch │ Distributor ID: CentOS │ Description: CentOS Linux release 7.2.1511 (Core) │ Release: 7.2.1511 │ Codename: Core [root@huangjun /usr/src/ceph-int/build]$ uname -a │ Linux huangjun 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Updated by huang jun about 6 years ago
@ Stephan Müller
cd: /usr/src/ceph/build/src/pybind/mgr/dashboard/frontend: No such file or directory
Updated by Lenz Grimmer about 6 years ago
huang jun wrote:
cd: /usr/src/ceph/build/src/pybind/mgr/dashboard/frontend: No such file or directory
Which path are the Ceph sources installed in? Try:
cd /usr/src/ceph-int/build/src/pybind/mgr/dashboard/frontend; npm install; npm run build -- --prod
Updated by huang jun about 6 years ago
I have two repos, one is /usr/src/ceph and other is /usr/src/ceph-int.
I check the /usr/src/ceph/build/src/pybind/mgr/dashboard there is no dir named "frontend"
[root@huangjun build]# ls /usr/src/ceph/build/src/pybind/mgr/dashboard/ CMakeFiles cmake_install.cmake CTestTestfile.cmake Makefile node-env
Updated by Lenz Grimmer about 6 years ago
huang jun wrote:
I have two repos, one is /usr/src/ceph and other is /usr/src/ceph-int.
I check the /usr/src/ceph/build/src/pybind/mgr/dashboard there is no dir named "frontend"
[...]
Indeed, my apologies. The Dashboard sources need to be built in the original source directory, so either /usr/src/ceph/src/pybind/mgr/dashboard/frontend
or /usr/src/ceph-int/src/pybind/mgr/dashboard/frontend
in your case.
In this directory, try calling the following command:
$ npm install $ npm run build -- --prod
Updated by huang jun about 6 years ago
But there is no frontend dir in my source directory.
Did i missed something? or what should i do to get this directory?
Updated by Lenz Grimmer about 6 years ago
huang jun wrote:
But there is no frontend dir in my source directory.
Did i missed something? or what should i do to get this directory?
Which branch if the git repository did you check out? src/pybind/mgr/dashboard/frontend
currently exists on the master
branch only.
Updated by Lenz Grimmer about 6 years ago
huang jun wrote:
yes, it is master branch
Then you should check your local git repository for consistency/freshness - as you can see here, the frontend
directory definitely exists in the master branch.
Updated by huang jun about 6 years ago
oh, i misunderstand your opions before.
The directory /usr/src/ceph/src/pybind/mgr/dashboard/frontend exists,
and i execute the commands
$ npm install $ npm run build -- --prod
Updated by huang jun about 6 years ago
But got this
0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'build', '--', '--prod' ] 2 info using npm@3.10.10 3 info using node@v6.14.0 4 verbose run-script [ 'prebuild', 'build', 'postbuild' ] 5 info lifecycle ceph-dashboard@0.0.0~prebuild: ceph-dashboard@0.0.0 6 silly lifecycle ceph-dashboard@0.0.0~prebuild: no script for prebuild, continuing 7 info lifecycle ceph-dashboard@0.0.0~build: ceph-dashboard@0.0.0 8 verbose lifecycle ceph-dashboard@0.0.0~build: unsafe-perm in lifecycle true 9 verbose lifecycle ceph-dashboard@0.0.0~build: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/usr/src/ceph/src/pybind/mgr/dashboard/frontend/node_modules/.bin:/opt/rh/devtoolset-7/root/usr/bin:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin 10 verbose lifecycle ceph-dashboard@0.0.0~build: CWD: /usr/src/ceph/src/pybind/mgr/dashboard/frontend 11 silly lifecycle ceph-dashboard@0.0.0~build: Args: [ '-c', 'ng build "--prod"' ] 12 silly lifecycle ceph-dashboard@0.0.0~build: Returned: code: 1 signal: null 13 info lifecycle ceph-dashboard@0.0.0~build: Failed to exec build script 14 verbose stack Error: ceph-dashboard@0.0.0 build: `ng build "--prod"` 14 verbose stack Exit status 1 14 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:255:16) 14 verbose stack at emitTwo (events.js:106:13) 14 verbose stack at EventEmitter.emit (events.js:191:7) 14 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:40:14) 14 verbose stack at emitTwo (events.js:106:13) 14 verbose stack at ChildProcess.emit (events.js:191:7) 14 verbose stack at maybeClose (internal/child_process.js:920:16) 14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5) 15 verbose pkgid ceph-dashboard@0.0.0 16 verbose cwd /usr/src/ceph/src/pybind/mgr/dashboard/frontend 17 error Linux 3.10.0-327.el7.x86_64 18 error argv "/usr/bin/node" "/usr/bin/npm" "run" "build" "--" "--prod" 19 error node v6.14.0 20 error npm v3.10.10 21 error code ELIFECYCLE 22 error ceph-dashboard@0.0.0 build: `ng build "--prod"` 22 error Exit status 1 23 error Failed at the ceph-dashboard@0.0.0 build script 'ng build "--prod"'. 23 error Make sure you have the latest version of node.js and npm installed. 23 error If you do, this is most likely a problem with the ceph-dashboard package, 23 error not with npm itself. 23 error Tell the author that this fails on your system: 23 error ng build "--prod" 23 error You can get information on how to open an issue for this project with: 23 error npm bugs ceph-dashboard 23 error Or if that isn't available, you can get their info via: 23 error npm owner ls ceph-dashboard 23 error There is likely additional logging output above. 24 verbose exit [ 1, true ]
Updated by Lenz Grimmer about 6 years ago
I'm note a Node/NPM expert and a google search for the message error code ELIFECYCLE
was not conclusive, but I wonder if your versions are too old to build the dashboard?
error node v6.14.0
error npm v3.10.10
error code ELIFECYCLE
error ceph-dashboard@0.0.0 build: `ng build "--prod"`
error Exit status 1
error Failed at the ceph-dashboard@0.0.0 build script 'ng build "--prod"'.
error Make sure you have the latest version of node.js and npm installed.
@Tiago - any idea what might go wrong here?
Updated by huang jun about 6 years ago
hi, Lenz
I upgrade nodejs, and report log is
0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'build', '--', '--prod' ] 2 info using npm@6.0.0 3 info using node@v9.11.1 4 verbose run-script [ 'prebuild', 'build', 'postbuild' ] 5 info lifecycle ceph-dashboard@0.0.0~prebuild: ceph-dashboard@0.0.0 6 info lifecycle ceph-dashboard@0.0.0~build: ceph-dashboard@0.0.0 7 verbose lifecycle ceph-dashboard@0.0.0~build: unsafe-perm in lifecycle true 8 verbose lifecycle ceph-dashboard@0.0.0~build: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/usr/src/ceph/src/pybind/mgr/dashboard/frontend/node_modules/.bin:/opt/rh/devtoolset-7/root/usr/bin:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin 9 verbose lifecycle ceph-dashboard@0.0.0~build: CWD: /usr/src/ceph/src/pybind/mgr/dashboard/frontend 10 silly lifecycle ceph-dashboard@0.0.0~build: Args: [ '-c', 'ng build "--prod"' ] 11 silly lifecycle ceph-dashboard@0.0.0~build: Returned: code: 1 signal: null 12 info lifecycle ceph-dashboard@0.0.0~build: Failed to exec build script 13 verbose stack Error: ceph-dashboard@0.0.0 build: `ng build "--prod"` 13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:283:16) 13 verbose stack at EventEmitter.emit (events.js:180:13) 13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:180:13) 13 verbose stack at maybeClose (internal/child_process.js:936:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5) 14 verbose pkgid ceph-dashboard@0.0.0 15 verbose cwd /usr/src/ceph/src/pybind/mgr/dashboard/frontend 16 verbose Linux 3.10.0-327.el7.x86_64 17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "build" "--" "--prod" 18 verbose node v9.11.1 19 verbose npm v6.0.0 20 error code ELIFECYCLE 21 error errno 1 22 error ceph-dashboard@0.0.0 build: `ng build "--prod"` 22 error Exit status 1 23 error Failed at the ceph-dashboard@0.0.0 build script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]
Updated by huang jun about 6 years ago
finally, follow the below steps, i resolved this problem
cd /usr/src/ceph/src/pybind/mgr/dashboard/frontend/ npm cache clean --force rm -rf node_modules/ rpm -e nodejs wget https://rpm.nodesource.com/pub_9.x/el/7/x86_64/nodejs-9.11.1-1nodesource.x86_64.rpm rpm -ivh nodejs-9.11.1-1nodesource.x86_64.rpm npm install npm run build -- --prod
Updated by Lenz Grimmer about 6 years ago
- Status changed from New to Can't reproduce
huang jun wrote:
finally, follow the below steps, i resolved this problem
OK, thanks for the feedback - glad you got it working. It would have been interesting to learn which of these steps actually fixed it, but for the time being I'm resolving this issue as "Can't reproduce".
Updated by Ernesto Puerta about 3 years ago
- Project changed from mgr to Dashboard
- Category changed from 132 to General