Ionic-cli: Cannot find module "setimmediate"

Created on 17 Mar 2017  路  4Comments  路  Source: ionic-team/ionic-cli

I tried installing ionic on my Mac.

I folllowed all the steps given here: https://ionicframework.com/getting-started/

When i hit : ionic serve the localhost:8080/ shows the error:

Runtime Error
Cannot find module "setimmediate"

Error: Cannot find module "setimmediate"
at v (http://localhost:8100/build/polyfills.js:3:4864)
at webpackMissingModule (http://localhost:8100/build/main.js:84780:65)
at Object. (http://localhost:8100/build/main.js:84780:155)
at __webpack_require__ (http://localhost:8100/build/main.js:20:30)
at Object. (http://localhost:8100/build/main.js:160657:44)
at __webpack_require__ (http://localhost:8100/build/main.js:20:30)
at Object. (http://localhost:8100/build/main.js:159850:19)
at __webpack_require__ (http://localhost:8100/build/main.js:20:30)
at Object. (http://localhost:8100/build/main.js:124477:20)
at __webpack_require__ (http://localhost:8100/build/main.js:20:30)
at Object. (http://localhost:8100/build/main.js:151157:14)
at __webpack_require__ (http://localhost:8100/build/main.js:20:30)
at Object. (http://localhost:8100/build/main.js:157484:31)
at __webpack_require__ (http://localhost:8100/build/main.js:20:30)
at Object. (http://localhost:8100/build/main.js:149159:21)

I am not sure what I need to do next. Please help.

Most helpful comment

ok, I found out the solution, just in your command line do. It is because you are using old version of node.js. Update node js to latest version.
if you are not updating node js, the following command solves the problem works
npm install setimmediate
ionic serve

cheers

All 4 comments

Could you provide me with the output from ionic info from within your project directory? Thanks, this should help in troubleshooting.

I am also having the same problem and don't know how to solve it. Here is my ionic info details

ordova CLI: 6.5.0
Ionic Framework Version: 2.2.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 1.1.4
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v4.5.0
Xcode version: Not installed

ok, I found out the solution, just in your command line do. It is because you are using old version of node.js. Update node js to latest version.
if you are not updating node js, the following command solves the problem works
npm install setimmediate
ionic serve

cheers

This issue has been automatically closed because it had the v2 label. Please install the new CLI v3 (npm install -g ionic@latest). See CHANGELOG.md#Upgrading from CLI v2 for details.

If this issue is still a problem in CLI v3, please create a new issue. Thank you!

Was this page helpful?
0 / 5 - 0 ratings