Serve error


#1

I’m getting an error when running ionic serve command.

Running 'serve:before' npm script before serve
> ionic-hello-world@ watch /home/arvin/mobile/gumanaka
> ionic-app-scripts watch
[22:22:24]  ionic-app-scripts 0.0.23
[22:22:24]  watch started ...
[22:22:24]  build dev started ...
[22:22:24]  clean started ...
[22:22:24]  clean finished in 8 ms
[22:22:24]  copy started ...
[22:22:24]  typescript compiler started ...
[22:22:24]  lint started ...
[22:22:24]  

(node:24604) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): false

[22:22:24]  copy finished in 78 ms
[22:22:28]  src/app/app.component.ts(1,27): error TS2307: Cannot find module '@angular/core'.
[22:22:28]  src/app/app.module.ts(1,26): error TS2307: Cannot find module '@angular/core'.
[22:22:28]  src/app/main.dev.ts(1,40): error TS2307: Cannot find module '@angular/platform-browser-dynamic'.
[22:22:28]  src/pages/about/about.ts(1,27): error TS2307: Cannot find module '@angular/core'.
[22:22:28]  src/pages/contact/contact.ts(1,27): error TS2307: Cannot find module '@angular/core'.
[22:22:28]  src/pages/home/home.ts(1,27): error TS2307: Cannot find module '@angular/core'.
[22:22:28]  src/pages/tabs/tabs.ts(1,27): error TS2307: Cannot find module '@angular/core'.
[22:22:28]  typescript compiler ready in 3.30 s
[22:22:28]  bundle dev started ...
[22:22:28]  Error: Could not resolve '@angular/platform-browser-dynamic' from /home/arvin/mobile/gumanaka/.tmp/app/main.dev.js
    at Error (native)
    at /home/arvin/mobile/gumanaka/node_modules/@ionic/app-scripts/node_modules/rollup-plugin-node-resolve/dist/rollup-plugin-node-resolve.cjs.js:78:21
    at /home/arvin/mobile/gumanaka/node_modules/@ionic/app-scripts/node_modules/rollup-plugin-node-resolve/node_modules/browser-resolve/index.js:265:24
    at /home/arvin/mobile/gumanaka/node_modules/@ionic/app-scripts/node_modules/rollup-plugin-node-resolve/node_modules/resolve/lib/async.js:46:14
    at process (/home/arvin/mobile/gumanaka/node_modules/@ionic/app-scripts/node_modules/rollup-plugin-node-resolve/node_modules/resolve/lib/async.js:173:43)
    at ondir (/home/arvin/mobile/gumanaka/node_modules/@ionic/app-scripts/node_modules/rollup-plugin-node-resolve/node_modules/resolve/lib/async.js:188:17)
    at load (/home/arvin/mobile/gumanaka/node_modules/@ionic/app-scripts/node_modules/rollup-plugin-node-resolve/node_modules/resolve/lib/async.js:69:43)
    at onex (/home/arvin/mobile/gumanaka/node_modules/@ionic/app-scripts/node_modules/rollup-plugin-node-resolve/node_modules/resolve/lib/async.js:92:31)
    at /home/arvin/mobile/gumanaka/node_modules/@ionic/app-scripts/node_modules/rollup-plugin-node-resolve/node_modules/resolve/lib/async.js:22:47
    at FSReqWrap.oncomplete (fs.js:123:15)

[22:22:28]  sass started ...
[22:22:28]  sass failed:  Cannot generate Sass files without first bundling JavaScript files in order to know all used modules. Please build JS files first.

[22:22:28]  build dev failed:  Build failed

Here is the Ionic info
Your system information:

Cordova CLI: 6.3.0
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.1.0-beta.3
Ionic App Lib Version: 2.1.0-beta.1
OS: Distributor ID:	LinuxMint Description:	Linux Mint 17.3 Rosa 
Node Version: v6.7.0

NPM version: 3.10.8


#2

Try to run run npm install


#3

Any luck with this issue? I removed the node_modules and installed them again. I am receiving this error on build -

(node:14575) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: channel closed