Failed building rmf-web (#163)

Posted by @cwrx777:

Hi,

I am having issues in bootstrapping rmf-web main branch.
All the steps in the perquisites were followed.
OS: Ubuntu 20.04 LTS
ROS: galactic
npm: 8.13.1
node: 14.19.3
python3: 3.8.10
pipenv: 11.9.0

scripts/bootstrap.sh
....

> pipenv-install@0.0.0 install
> node ../scripts/pipenv-install.js

Pipfile.lock not found, creating…/icons-material: timing reifyNode:node_modules/date-fns Completed in 41663ms
Locking [dev-packages] dependencies…
lf._iter_dependencies(best_match):icons-material: timing reifyNode:node_modules/date-fns Completed in 41663ms
  File "/usr/lib/python3/dist-packages/pipenv/patched/piptools/resolver.py", line 275, in _iter_dependencies
    for dependency in self.repository.get_dependencies(ireq):
  File "/usr/lib/python3/dist-packages/pipenv/patched/piptools/repositories/pypi.py", line 174, in get_dependencies
    legacy_results = self.get_legacy_dependencies(ireq)
  File "/usr/lib/python3/dist-packages/pipenv/patched/piptools/repositories/pypi.py", line 193, in get_legacy_dependencies
    dist = ireq.get_dist()
  File "/usr/lib/python3/dist-packages/pipenv/vendor/pip9/req/req_install.py", line 1069, in get_dist
    egg_info = self.egg_info_path('').rstrip('/')
  File "/usr/lib/python3/dist-packages/pipenv/vendor/pip9/req/req_install.py", line 514, in egg_info_path
    raise InstallationError(
pip9.exceptions.InstallationError: No files/directories in /home/user0001/ws_rmf/rmf-web/packages/api-server (from )

Installing --site-packages…y:@mui/icons-material: timing reifyNode:node_modules/date-fns Completed in 41663ms
⠋WARNING: Invalid requirement, parse error at "'--site-p'"
ABORTING INSTALL... You will have to reinstall any packages that failed to install.
You may have to manually run pipenv lock when you are finished.
child_process.js:866 ⠸ reify:@mui/icons-material: timing reifyNode:node_modules/date-fns Completed in 41663ms
    throw err;
    ^

Error: Command failed: python3 -m pipenv install -d --site-packages
    at checkExecSyncError (child_process.js:790:11)
    at execSync (child_process.js:863:15)
    at Object.<anonymous> (/home/user0001/ws_rmf/rmf-web/scripts/pipenv-install.js:12:3)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)
    at internal/main/run_main_module.js:17:47 {
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 1024242,
  stdout: null,
  stderr: null
}
npm ERR! code 1
npm ERR! path /home/user0001/ws_rmf/rmf-web/pipenv-install
npm ERR! command failed
npm ERR! command sh -c /tmp/install-1656033552899.sh

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/user0001/.npm/_logs/2022-06-24T01_18_04_634Z-debug-0.log

a portion of the log file:

3892 info run pipenv-install@0.0.0 install pipenv-install node ../scripts/pipenv-install.js
3893 info run pipenv-install@0.0.0 install { code: 1, signal: null }
3897 verbose stack Error: command failed
3897 verbose stack     at ChildProcess.<anonymous> (/home/user0001/.nvm/versions/node/v14.19.3/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:63:27)
3897 verbose stack     at ChildProcess.emit (events.js:400:28)
3897 verbose stack     at maybeClose (internal/child_process.js:1088:16)
3897 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:296:5)
3898 verbose pkgid pipenv-install@0.0.0
3899 verbose cwd /home/user0001/ws_rmf/rmf-web
3900 verbose Linux 5.13.0-51-generic
3901 verbose node v14.19.3
3902 verbose npm  v8.13.1
3903 error code 1
3904 error path /home/user0001/ws_rmf/rmf-web/pipenv-install
3905 error command failed
3906 error command sh -c /tmp/install-1656033552899.sh
3907 verbose exit 1
Chosen answer

Answer chosen by @cwrx777 at 2022-06-30T05:49:03Z.
Answered by @aaronchongth:

Hello @cwrx777! Thanks for sharing the logs and information, I’m sorry you are facing this issue. Could you try updating your npm version, as that is the only difference in versioning I can see. I am running 8.5.0, and I believe that will be installed with

npm install -g npm@latest

Posted by @aaronchongth:

Hello @cwrx777! Thanks for sharing the logs and information, I’m sorry you are facing this issue. Could you try updating your npm version, as that is the only difference in versioning I can see. I am running 8.5.0, and I believe that will be installed with

npm install -g npm@latest

This is the chosen answer.

Posted by @cwrx777:

Hi @aaronchongth ,

Thanks for your reply.

The npm that I used was already the latest. Please see below.

The issue was still present even after changing npm to version 8.5.0.

Posted by @aaronchongth:

As a sanity check, are you using a source build of RMF or the binaries?

If it is a source build, have you sourced the workspace?

I’ve just completed a fresh build from scratch using the ros:galactic-ros-core-focal docker image, and couldn’t replicate your issue. The installed npm version in the image is 8.13.1, so at least we can confirm that is not the cause.

Posted by @cwrx777:

Hi @aaronchongth ,

I redownloaded and rebuilt rmf-web and rmf from main branch, the issue is still the same. I can confirm that I have sourced rmf workspace before running the rmf-web bootstrap script.

How did you do what you did?

Posted by @aaronchongth:

There might be some typos here and there, but I collected these using my history in my container. gist:41f60f71ba5b5d95344a070640354bc0 · GitHub

Edit: Just to make it clear, this set of instructions builds rmf and rmf-web in a “standard” docker container, which means it is highly likely that the issue is some misconfiguration on your machine. I’ll check around and see what could be the cause, based on your logs and output.


Edited by @aaronchongth at 2022-06-29T10:02:08Z

Posted by @cwrx777:

Hi @aaronchongth ,

The steps you provided is really helpful. I found out that the pipenv version in the environment created following your step is 2022.6.7 and in mine there was two pipenv installed, one in /usr/bin/pipenv (version 11.9.0) and another one in /usr/local/bin/pipenv (2022.6.7).

After uninstalling both and reinstalling 2022.6.7, the bootstrap script was able to complete.

Posted by @cwrx777:

Hi @aaronchongth ,
This has nothing to do with rmf-web. But do you have any idea on the cause of this error? I encountered this when running in my environment. I didn’t encounter this error when running inside the container created earlier.

Posted by @aaronchongth:

I am unsure if this is related, Fresh Ubuntu 20.04 setup, dependencies not installed · Issue #607 · open-rmf/rmf-web · GitHub, but we can continue the conversation there.

Could you please mark this thread as answered?