Cannot find module 'at-least-node'
Asked Answered
Z

1

10

Unable to load Platform API from /Users/RK/Documents/IONIC/ionic/myApp/platforms/ios/cordova/Api.js: Cannot find module 'at-least-node'

making ios build in ionic 3.4

Zackzackariah answered 8/8, 2020 at 5:35 Comment(1)
You should mark the below as accepted :)Obnubilate
T
3

Pretty sure the magic that fixed it for me:

  • delete /node_modules, /platforms, /plugins, /package-lock.json
  • re-run troubled command(s)

But here are all the things I did (incase it was a different thing that actually fixed it)....

Windows:

  • Upgrading node from 12.14.0 -> 15.x
  • delete node_modules, platforms, plugins, package-lock.json
  • re-run troubled command(s)
    • success!

Mac:

  • Upgrading node from 12.14.0 -> 14.15.0 (probably didn't actually matter)
  • delete node_modules, platforms, plugins
  • re-run troubled command(s)
    • failed
  • delete node_modules, platforms, plugins, package-lock.json
  • Restart computer (mac)
  • re-run troubled command(s)
    • success!

All are on Cordova 9.0.0 and node 14+.
Received this error when installing plugins usually.
Got the error for building ios and android.

Tocology answered 5/11, 2020 at 5:57 Comment(2)
I can confirm that removing the package-lock.json file was the magic. Thank you!Obnubilate
Thank you very much. This issue was show stopper for us but after following your steps, it's working like a charm. These are the steps which we follow 1. Delete following folders platforms node_modules plugins package-lock.json Run following commands stap by stap 1. npm install 2. ionic cordova platform add androidJaquiss

© 2022 - 2024 — McMap. All rights reserved.