Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bootstrap script not working on latest npm #599

Closed
koonpeng opened this issue Mar 29, 2022 · 13 comments
Closed

bootstrap script not working on latest npm #599

koonpeng opened this issue Mar 29, 2022 · 13 comments
Labels
bug Something isn't working

Comments

@koonpeng
Copy link
Collaborator

koonpeng commented Mar 29, 2022

Bug report

The bootstrap script no longer works with the latest npm due to npm/cli#4552.

A temporary workaround is being added to the CI to use an older version #598. The old version can be reverted once the bug is fixed in npm.

@koonpeng koonpeng added the bug Something isn't working label Mar 29, 2022
@daichuihua
Copy link

when does this bug fixed? Is there another way to use rmf-web?

@mayman99
Copy link
Contributor

This should have been fixed on main branch, do you still have it?
also a work around for now is to use an npm version older than 8.4

@daichuihua
Copy link

This should have been fixed on main branch, do you still have it? also a work around for now is to use an npm version older than 8.4

My situation:bootstrap script can work on latest npm right now ,but "cd rmf-web/packages/dashboard" and "npm start" no work
like this:
Screenshot from 2022-04-12 10-33-58
Screenshot from 2022-04-12 10-34-25
Screenshot from 2022-04-12 10-35-23

@mayman99
Copy link
Contributor

🤔 could you maybe write the exact commands that you are using in each terminal?
and in the dashboard package, does running npm run build before the npm run start get you any different result?

@daichuihua
Copy link

thinking could you maybe write the exact commands that you are using in each terminal? and in the dashboard package, does running npm run build before the npm run start get you any different result?

1>cd rmf-web-main && cd scripts && ./bootstrap.sh (1st terminal)
Screenshot from 2022-04-12 14-02-59

2>ros2 launch rmf_demos_gz office.launch.xml server_uri:="ws://localhost:8001" (2nt terminal)
Screenshot from 2022-04-12 14-04-37

3>cd rmf-web-main/packages/dashboard && npm run start (3rd terminal)
Screenshot from 2022-04-12 14-07-07
Screenshot from 2022-04-12 14-07-45

result:
[start:rmf-server] from tortoise import Tortoise
[start:rmf-server] ModuleNotFoundError: No module named 'tortoise'
[start:rmf-server] npm ERR! Lifecycle script start:rmf-server failed with error:
[start:rmf-server] npm ERR! Error: command failed
[start:rmf-server] npm ERR! in workspace: [email protected]
[start:rmf-server] npm ERR! at location: /home/dch/rmf-web-main/packages/dashboard
[start:rmf-server] npm run start:rmf-server exited with code 1
[start:react] Compiled successfully!
[start:react]
[start:react] You can now view rmf-dashboard in the browser.
[start:react]
[start:react] Local: http://localhost:3000/
[start:react] On Your Network: http://10.10.17.90:3000/
[start:react]
[start:react] Note that the development build is not optimized.
[start:react] To create a production build, use npm run build.

@mayman99
Copy link
Contributor

So the lifecycle error should appear when using the latest npm version, which it does in your case.
To confirm this, I've upgraded my npm version and I get a lifecycle error as well, and when I downgrade the npm version it goes away.

So I would suggest deleting the node_module in rmf_web root dir, downgrade npm to the LTS which should be v16.14.2, and bootstrap and run everything again.
Hopefully this will solve the problem for you, if not we can investigate further

@daichuihua
Copy link

I install 16.14.2 by "nvm install 16.14.2" and "nvm use 16.14.2" ,then bootstrap and run everything again. it still don't works. as follow:
Screenshot from 2022-04-12 16-40-30

sometimes, when i run "./bootstrap" ,i found an ERROR : husky > Failed to install
as follow:
Screenshot from 2022-04-12 16-38-10

It 's matter or not?

@mayman99
Copy link
Contributor

the error this time is coming from a ros2 package, it complains numpy is not installed

@daichuihua
Copy link

"cd rmf-web"&&"pipenv install numpy" and run"npm start" once again
bingo ,it works!
thank you very much ,mayman99

@mayman99
Copy link
Contributor

Glad it worked!

@mayman99
Copy link
Contributor

it was still not working on latest, we had to downgrade npm for it to work... issue persists

@mayman99 mayman99 reopened this Apr 23, 2022
@aaronchongth
Copy link
Member

Yup, apologies, I was following the conversation at the tail end of this thread and got a little trigger-happy. I'll be more careful next time

@aaronchongth
Copy link
Member

I think #611 was to fix this issue, not #559. Will be closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants