Server start error: ReferenceError

Hey there,

I’ve got a new iMac recently and I just copied the whole ionic project folder from my desktop to my new iMac.

I can’t serve the project anymore I’m gettin following error:

server start error: ReferenceError: ionic is not defined
at Object.gulpStartupTasks (/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/serve.js:253:14)
at Object.start (/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/serve.js:487:36)
at /usr/local/lib/node_modules/ionic/lib/ionic/serve.js:52:20
at _fulfilled (/usr/local/lib/node_modules/ionic/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/ionic/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/ionic/node_modules/q/q.js:749:13)
at /usr/local/lib/node_modules/ionic/node_modules/q/q.js:557:44
at flush (/usr/local/lib/node_modules/ionic/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:355:11)
at Function.Module.runMain (module.js:503:11)
at startup (node.js:129:16)
at node.js:814:3

Everything is fine if I’m starting a new project tho…
any ideas? or am I missing something?

I’m getting the same error. Looking for a solution…

Dunno if this fixed it but, I cleaned up my ionic.project file and just left the “name” and “app_id” and now it works…

I am looking for a solution as well…I wonder if 1.4.3 broke anything.

Same issue here :frowning:

Deleting node_modules and then running npm update worked for me. :smile:

in my case I had this error because the command gulp was not accessible in the command line, i had to install gulp globally in order for it to work: npm install gulp -g

1 Like

I had the same issue. sudo npm install gulp -g fixed it

I’ll try reinstalling gulp. :slight_smile:

npm install -g gulp

again fixed it for me.

Thanks that worked for me too!

Which node modules i must delete…?? there are 2 node modules for me…

  1. C:\Users\username\node_modules.
  2. C:\Users\username\AppData\Roaming\npm\node_modules