Open felixveysseyre opened 6 years ago
I try to manually run the npm install
command:
vagrant ssh
sudo -iu hpccloud
cd /opt/hpccloud/hpccloud/
rm -Rf node_modules
npm install
I got the same error but for another package:
npm ERR! Linux 3.13.0-119-generic npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" npm ERR! node v6.11.5 npm ERR! npm v3.10.10 npm ERR! path /opt/hpccloud/hpccloud/node_modules/sshpk/bin/sshpk-sign npm ERR! code ENOENT npm ERR! errno -2 npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/opt/hpccloud/hpccloud/node_modules/sshpk/bin/sshpk-sign' npm ERR! enoent ENOENT: no such file or directory, chmod '/opt/hpccloud/hpccloud/node_modules/sshpk/bin/sshpk-sign' npm ERR! enoent This is most likely not a problem with npm itself npm ERR! enoent and is related to npm not being able to find a file. npm ERR! enoent
npm ERR! Please include the following file with any support request: npm ERR! /opt/hpccloud/hpccloud/npm-debug.log
Retrying again, I got the same kind of issues but never the exact same one:
npm ERR! Linux 3.13.0-119-generic npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" npm ERR! node v6.11.5 npm ERR! npm v3.10.10 npm ERR! path /opt/hpccloud/hpccloud/node_modules/d3-dsv/bin/csv2tsv npm ERR! code ENOENT npm ERR! errno -2 npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/opt/hpccloud/hpccloud/node_modules/d3-dsv/bin/csv2tsv' npm ERR! enoent ENOENT: no such file or directory, chmod '/opt/hpccloud/hpccloud/node_modules/d3-dsv/bin/csv2tsv' npm ERR! enoent This is most likely not a problem with npm itself npm ERR! enoent and is related to npm not being able to find a file. npm ERR! enoent
npm ERR! Please include the following file with any support request: npm ERR! /opt/hpccloud/hpccloud/npm-debug.log
I tried to run the installing step from the host and it ran smoothly.
node: v6.9.2 (vs v6.11.5) npm: v3.10.9 (vs v3.10.10)
Trying to clone latest HPCCloud repository directly inside the VM using hpccloud user, I am able to install the project without any issue:
vagrant ssh
sudo -iu hpccloud
cd /opt/hpccloud
git clone https://github.com/Kitware/HPCCloud.git
cd HPCCloud
npm install
More interesting, if I copy hpccloud
directory with hpccloud user, I am able to install the project without any issue:
vagrant ssh
sudo -iu hpccloud
cd /opt/hpccloud/
cp -R hpccloud hpccloud2
cd hpccloud2
npm install
Since the only changes between hpccloud
and hpccloud2
directories are permissions (some of hpccloud
directory files belongs to 1003 group instead of hpccloud), it seems like a permission issue.
@felixveysseyre I think you are right, try this #117, it changes the gid to 1002. Not sure why this isn't causing a problem on linux.
You recreated the VM? What is the group for the shared directory now?
Yes, from scratch:
vagrant destroy
DEVELOPMENT=1 vagrant up
The error I got from NPM is:
npm ERR! Linux 3.13.0-119-generic npm ERR! argv \"/usr/local/bin/node\" \"/usr/local/bin/npm\" \"run\" \"build:release\" npm ERR! node v6.11.5 npm ERR! npm v3.10.10 npm ERR! file sh npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn npm ERR! hpc-cloud@0.9.0 build:release:
fix-autobahn && NODE_ENV='production' webpack -p --progress --colors
npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the hpc-cloud@0.9.0 build:release script 'fix-autobahn && NODE_ENV='production' webpack -p --progress --colors'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the hpc-cloud package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! fix-autobahn && NODE_ENV='production' webpack -p --progress --colors npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs hpc-cloud npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls hpc-cloud npm ERR! There is likely additional logging output above.
Everything seem to belong to hpccloud user now:
hpccloud@vagrant-ubuntu-trusty-64:/opt/hpccloud$ ls -alsh
total 16K
4.0K drwxr-xr-x 5 hpccloud hpccloud 4.0K Jan 18 08:43 .
4.0K drwxr-xr-x 3 root root 4.0K Jan 18 08:41 ..
4.0K drwxr-xr-x 10 root root 4.0K Jan 18 08:43 cumulus
0 drwxr-xr-x 1 hpccloud hpccloud 782 Jan 18 08:45 hpccloud
4.0K drwxr-x--- 2 hpccloud hpccloud 4.0K Jan 18 08:43 keys
hpccloud@vagrant-ubuntu-trusty-64:/opt/hpccloud/hpccloud$ ls -alsh
total 64K
0 drwxr-xr-x 1 hpccloud hpccloud 782 Jan 18 08:45 .
4.0K drwxr-xr-x 5 hpccloud hpccloud 4.0K Jan 18 08:43 ..
0 drwxr-xr-x 1 hpccloud hpccloud 136 Jan 17 08:38 bin
0 drwxr-xr-x 1 hpccloud hpccloud 850 Jan 17 08:38 dist
0 drwxr-xr-x 1 hpccloud hpccloud 238 Jan 17 08:38 docs
4.0K -rw-r--r-- 1 hpccloud hpccloud 3.6K Jan 17 08:38 ec2_instance_types.py
4.0K -rw-r--r-- 1 hpccloud hpccloud 463 Jan 17 08:38 .editorconfig
4.0K -rw-r--r-- 1 hpccloud hpccloud 1.4K Jan 17 08:38 .eslintrc.js
0 drwxr-xr-x 1 hpccloud hpccloud 442 Jan 17 08:38 .git
4.0K -rw-r--r-- 1 hpccloud hpccloud 115 Jan 17 08:38 .gitignore
12K -rw-r--r-- 1 hpccloud hpccloud 10K Jan 17 08:38 LICENSE
0 drwxr-xr-x 1 hpccloud hpccloud 43K Jan 18 08:44 node_modules
4.0K -rw-r--r-- 1 hpccloud hpccloud 2.9K Jan 18 08:45 npm-debug.log
4.0K -rw-r--r-- 1 hpccloud hpccloud 50 Jan 17 08:38 .npmignore
4.0K -rw-r--r-- 1 hpccloud hpccloud 3.3K Jan 17 08:38 package.json
4.0K -rw-r--r-- 1 hpccloud hpccloud 1.4K Jan 17 08:38 README.md
4.0K -rw-r--r-- 1 hpccloud hpccloud 94 Jan 17 08:38 requirements.txt
0 drwxr-xr-x 1 hpccloud hpccloud 170 Jan 17 08:38 server
0 drwxr-xr-x 1 hpccloud hpccloud 408 Jan 17 08:38 src
0 drwxr-xr-x 1 hpccloud hpccloud 680 Jan 17 08:38 style
4.0K -rw-r--r-- 1 hpccloud hpccloud 3.0K Jan 17 08:38 .travis.yml
4.0K -rw-r--r-- 1 hpccloud hpccloud 1.9K Jan 17 08:38 URLS.md
4.0K -rw-r--r-- 1 hpccloud hpccloud 2.1K Jan 17 08:38 webpack.config.js
Looking at it again, it changed something. We now pass the hpccloud : Run npm install
task but fail at the one after: hpccloud : Run npm run build
.
I got the same result while executing manually the build process.
Here is the complete stack:
hpccloud@vagrant-ubuntu-trusty-64:/opt/hpccloud/hpccloud$ cat npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ]
2 info using npm@3.10.10
3 info using node@v6.11.5
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle hpc-cloud@0.9.0~prebuild: hpc-cloud@0.9.0
6 verbose lifecycle hpc-cloud@0.9.0~prebuild: unsafe-perm in lifecycle true
7 verbose lifecycle hpc-cloud@0.9.0~prebuild: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/opt/hpccloud/hpccloud/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
8 verbose lifecycle hpc-cloud@0.9.0~prebuild: CWD: /opt/hpccloud/hpccloud
9 silly lifecycle hpc-cloud@0.9.0~prebuild: Args: [ '-c', 'npm run check' ]
10 silly lifecycle hpc-cloud@0.9.0~prebuild: Returned: code: 0 signal: null
11 info lifecycle hpc-cloud@0.9.0~build: hpc-cloud@0.9.0
12 verbose lifecycle hpc-cloud@0.9.0~build: unsafe-perm in lifecycle true
13 verbose lifecycle hpc-cloud@0.9.0~build: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/opt/hpccloud/hpccloud/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
14 verbose lifecycle hpc-cloud@0.9.0~build: CWD: /opt/hpccloud/hpccloud
15 silly lifecycle hpc-cloud@0.9.0~build: Args: [ '-c', 'fix-autobahn && webpack --progress --colors' ]
16 info lifecycle hpc-cloud@0.9.0~build: Failed to exec build script
17 verbose stack Error: hpc-cloud@0.9.0 build: `fix-autobahn && webpack --progress --colors`
17 verbose stack spawn ENOENT
17 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:33:16)
17 verbose stack at emitTwo (events.js:106:13)
17 verbose stack at ChildProcess.emit (events.js:191:7)
17 verbose stack at maybeClose (internal/child_process.js:920:16)
17 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
18 verbose pkgid hpc-cloud@0.9.0
19 verbose cwd /opt/hpccloud/hpccloud
20 error Linux 3.13.0-119-generic
21 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
22 error node v6.11.5
23 error npm v3.10.10
24 error file sh
25 error code ELIFECYCLE
26 error errno ENOENT
27 error syscall spawn
28 error hpc-cloud@0.9.0 build: `fix-autobahn && webpack --progress --colors`
28 error spawn ENOENT
29 error Failed at the hpc-cloud@0.9.0 build script 'fix-autobahn && webpack --progress --colors'.
29 error Make sure you have the latest version of node.js and npm installed.
29 error If you do, this is most likely a problem with the hpc-cloud package,
29 error not with npm itself.
29 error Tell the author that this fails on your system:
29 error fix-autobahn && webpack --progress --colors
29 error You can get information on how to open an issue for this project with:
29 error npm bugs hpc-cloud
29 error Or if that isn't available, you can get their info via:
29 error npm owner ls hpc-cloud
29 error There is likely additional logging output above.
30 verbose exit [ 1, true ]
Trying to build a manually fetched HPCCloud repository does not produce the same issue.
Does it make any sense to you ?
EDIT:
Looking again at the error, I found on the line before NPM error statements, the folowwing message: sh: 1: webpack: not found
However, there is a opt/hpccloud/hpccloud/node_modules/webpack/bin/webpack.js
file.
So the first error in the log is webpack: not found
?
Is it possible that npm/node are too old. We need npm 3+
@cjh1, yes it is. I don't understand why, but when the HPCCloud project is used, in the one share with the host. NPM can not find webpack.
@jourdain NPM version 3.10.10 is used in our case.
Did you run npm install
on the host? I bet it can not be run from the VM as a shared directory.
@jourdain npm install
can be run without any problem now. This only npm run build:***
which is failing.
If I clone manually the repo in another directory, I can run installation and building commands without any problem.
To me it seems to be related to write issue in that shared directory...
@jourdain How could I check that ?
I don't know. But usually the logic when you are in DEV mode is that you do your build/dev on your actual machine and the VM is just reading it to expose the new ui via its web server.
Not the other way around.
Make sense to me.
Should we disable the ansible building task when in DEV ?
Hello,
I try to create the HPCCloud VM in development mode in order to work on a custom HPCCloud project.
I have cloned latest HPCCloud-deploy project:
I have cloned latest HPCCLoud project, under the name of
hpccloud
:I start the VM building process:
I got the following error:
Here is the issue correctly formatted:
Mac OSX: 10.11.2 Vagrant: 1.9.5 Ansible: 2.3.0.0 (local), 2.1.0.0 (on VM)
Thanks