Cannot run grunt command because of error: cannot find module 'liftoff' Cannot run grunt command because of error: cannot find module 'liftoff' windows windows

Cannot run grunt command because of error: cannot find module 'liftoff'


I've faced the same issue under Ubuntu 20.04 and I believe it's caused by several versions of nodejs.

I have installed nodejs 12.16.2 manually (extracted to /usr/local) and that was my mistake. Once I tried to install grunt from Ubuntu package manager it installed nodejs 10.X as a dependency of node-grunt-cli package.

As a result I had the same error message.

The solution was to remove manually installed nodejs and re-install it from package manager.


I also hit this on a clean install on Ubuntu 20.04. I eventually hunted down a recipe at https://ask.openrouteservice.org/t/cannot-find-module-liftoff/1718/5 that seems to fix the problem (not sure why) using nvm to install node v14.16.1, then install grunt-cli globally and grunt locally:

nvm install v14.16.1npm install -g grunt-clinpm install grunt


Faced problem when using:

  • Ubuntu 20.04 LTS
  • Node 16.6.1
  • NPM 7.20.3

Fixed problem when using:

  • Ubuntu 20.04 LTS
  • Node 8.17.0
  • NPM 7.20.6

I used NVM to downgrade Node version using nvm use 8.17 which fixed the error Error: Cannot find module 'liftoff'.