Error after ionic serve

When i start the ionic project a large error message is coming while installing node modules

Your environment has been set up for using Node.js 4.2.1 (x64) and npm.

C:\Users\Ritesh>ionic start apjk tabs --v2

One awesome Ionic app coming right up...

Downloading: https://github.com/driftyco/ionic2-app-base/archive/master.zip
[=============================]  100%  0.0s
Downloading: https://github.com/driftyco/ionic2-starter-tabs/archive/master.zip
[=============================]  100%  0.0s
**Installing Node Modules**

> Unable to run exec commandError: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "npm install"
> npm WARN package.json @ No description
> npm WARN package.json @ No repository field.
> npm WARN package.json @ No README data
> npm WARN package.json @ No license field.
> npm WARN optional dep failed, continuing fsevents@1.0.8
> npm WARN deprecated graceful-fs@3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
> npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
> npm WARN deprecated graceful-fs@1.2.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
> npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
> npm WARN optional dep failed, continuing fsevents@1.0.8
> npm ERR! Windows_NT 10.0.10240
> npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
> npm ERR! node v4.2.1
> npm ERR! npm  v2.14.7
> npm ERR! path C:\Users\Ritesh\AppData\Roaming\npm-cache\sparkles\1.0.0\package\package.json.5da23a4a7e802339d00faa34ee9dfaba
> npm ERR! code EPERM
> npm ERR! errno -4048
> npm ERR! syscall rename

> npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\Ritesh\AppData\Roaming\npm-cache\sparkles\1.0.0\package\package.json.5da23a4a7e802339d00faa34ee9dfaba' -> 'C:\Users\Ritesh\AppData\Roaming\npm-cache\sparkles\1.0.0\package\package.json'
> npm ERR!     at Error (native)
> npm ERR!  { [Error: EPERM: operation not permitted, rename 'C:\Users\Ritesh\AppData\Roaming\npm-cache\sparkles\1.0.0\package\package.json.5da23a4a7e802339d00faa34ee9dfaba' -> 'C:\Users\Ritesh\AppData\Roaming\npm-cache\sparkles\1.0.0\package\package.json']
> npm ERR!   errno: -4048,
> npm ERR!   code: 'EPERM',
> npm ERR!   syscall: 'rename',
> npm ERR!   path: 'C:\\Users\\Ritesh\\AppData\\Roaming\\npm-cache\\sparkles\\1.0.0\\package\\package.json.5da23a4a7e802339d00faa34ee9dfaba',
> npm ERR!   dest: 'C:\\Users\\Ritesh\\AppData\\Roaming\\npm-cache\\sparkles\\1.0.0\\package\\package.json',
> npm ERR!   parent: 'glogg' }
> npm ERR!
> npm ERR! Please try running this command again as root/Administrator.

> npm ERR! Please include the following file with any support request:
> npm ERR!     C:\Users\Ritesh\apjk\npm-debug.log
>  (CLI v2.0.0-beta.19)

Your system information:

Cordova CLI: 6.0.0
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Version: 2.0.0-beta.3
Ionic CLI Version: 2.0.0-beta.19
Ionic App Lib Version: 2.0.0-beta.9
OS:
Node Version: v4.2.1




C:\Users\Ritesh>



----------


----------


----------


----------

when i am using ionic serve on the same project error is coming.

Its shoing error like this:

Your environment has been set up for using Node.js 4.2.1 (x64) and npm.

C:\Users\Ritesh>cd apjkalam

C:\Users\Ritesh\apjkalam>ionic serve

∆ Compiling and bundling with Webpack...
√ Using your webpack.config.js file

∆ Compiling Sass to CSS
√ Matching patterns: app/theme/app.+(ios|md).scss

∆ Copying fonts
√ Matching patterns: node_modules/ionic-angular/fonts/**/*.+(ttf|woff|woff2)

∆ Copying HTML
√ Matching patterns: app/**/*.html

√ Sass compilation complete

   > **     ## ./app/app.js**
> **        ## Module build failed: Error: Couldn't find preset "es2015" relative to directory "C:\\Users\\Ritesh\\apjkalam\\app"**
> **        ##     at C:\Users\Ritesh\apjkalam\node_modules\babel-core\lib\transformation\file\options\option-manager.js:393:17**
> **        ##     at Array.map (native)**
> **        ##     at OptionManager.resolvePresets (C:\Users\Ritesh\apjkalam\node_modules\babel-core\lib\transformation\file\options\option-manager.js:385:20)**
> **        ##     at OptionManager.mergePresets (C:\Users\Ritesh\apjkalam\node_modules\babel-core\lib\transformation\file\options\option-manager.js:369:10)**
> **        ##     at OptionManager.mergeOptions (C:\Users\Ritesh\apjkalam\node_modules\babel-core\lib\transformation\file\options\option-manager.js:328:14)**
> **        ##     at OptionManager.init (C:\Users\Ritesh\apjkalam\node_modules\babel-core\lib\transformation\file\options\option-manager.js:486:10)**
> **        ##     at File.initOptions (C:\Users\Ritesh\apjkalam\node_modules\babel-core\lib\transformation\file\index.js:211:75)**
> **        ##     at new File (C:\Users\Ritesh\apjkalam\node_modules\babel-core\lib\transformation\file\index.js:129:22)**
> **        ##     at Pipeline.transform (C:\Users\Ritesh\apjkalam\node_modules\babel-core\lib\transformation\pipeline.js:48:16)**
> **        ##     at transpile (C:\Users\Ritesh\apjkalam\node_modules\babel-loader\index.js:14:22)**
> **        ##  @ multi main (CLI v2.0.0-beta.19)**

Your system information:

Cordova CLI: 6.0.0
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Version: 2.0.0-beta.2
Ionic CLI Version: 2.0.0-beta.19
Ionic App Lib Version: 2.0.0-beta.9
OS:
Node Version: v4.2.1

please help

It looks like your npm install did not work correctly.

Please close your terminal and just verify that you have node and npm setup correctly.

node -v
npm -v

thanks for the reply sir…it just started to work on it own when i downloaded the new project…!!
and node -v and npm -v are woking :slightly_smiling:

Good to hear they’re working, but I also need their output :grin:

I have just hit the same issue
C:\Users\amercer>node -v
v4.4.0

C:\Users\amercer>npm -v
2.14.20

C:\websites\ionic2\cutePuppyPics>ionic serve

./app/app.js
Module build failed: Error: Couldn't find preset "es2015" relative to directory "C:\\websites\\ionic2\\cutePuppyPics\\app"
    at C:\websites\ionic2\cutePuppyPics\node_modules\babel-core\lib\transformation\file\options\option-manager.js:393:17
    at Array.map (native)
    at OptionManager.resolvePresets (C:\websites\ionic2\cutePuppyPics\node_modules\babel-core\lib\transformation\file\options\option-manager.js:385:20)
    at OptionManager.mergePresets (C:\websites\ionic2\cutePuppyPics\node_modules\babel-core\lib\transformation\file\options\option-manager.js:369:10)
    at OptionManager.mergeOptions (C:\websites\ionic2\cutePuppyPics\node_modules\babel-core\lib\transformation\file\options\option-manager.js:328:14)
    at OptionManager.init (C:\websites\ionic2\cutePuppyPics\node_modules\babel-core\lib\transformation\file\options\option-manager.js:486:10)
    at File.initOptions (C:\websites\ionic2\cutePuppyPics\node_modules\babel-core\lib\transformation\file\index.js:211:75)
    at new File (C:\websites\ionic2\cutePuppyPics\node_modules\babel-core\lib\transformation\file\index.js:129:22)
    at Pipeline.transform (C:\websites\ionic2\cutePuppyPics\node_modules\babel-core\lib\transformation\pipeline.js:48:16)
    at transpile (C:\websites\ionic2\cutePuppyPics\node_modules\babel-loader\index.js:14:22)
 @ multi main (CLI v2.0.0-beta.19)

Your system information:

Cordova CLI: 3.6.3-0.2.13
Gulp version:  CLI version 3.9.0
Gulp local:   Local version 3.9.1
Ionic Version: 2.0.0-beta.3
Ionic CLI Version: 2.0.0-beta.19
Ionic App Lib Version: 2.0.0-beta.9
OS: Windows 8.1
Node Version: v4.4.0

from package.json

“babel-preset-es2015”: “6.5.0”

I do not see this in

C:\websites\ionic2\cutePuppyPics\node_modules

I started with

npm install -g ionic@beta

I had same issue but I manually installed babel-preset-es2015 on the project using npm install --save-dev babel-preset-es2015. It worked for me.

yep, that worked for me too

This one did not have the same issue

ionic start MyIonic2Project tutorial --v2

Try to update cordova,ionic and npm …since ionic is in beta stag update are made in every 3-4 days…some issues which i face one day will be working good the next day…so try updating them all.

I resolve using this commands:

1 - sudo npm install --save babel-cli babel-preset-es2015
2- echo ‘{ “presets”: [“es2015”] }’ > .babelrc