$ ionic start fails due to missing ionic-angular module

Hi,
I am starting my trail with Ionic but unfortunately I am stuck in the very beginning.
After successful installation of node.js , ionic & cordova when I start the test app I get into errors.
Please let me know what I am missing here. Below is the error detail:

D:\mnk\RnD\ionic>ionic start mkApp sidemenu
√ Creating directory .\mkApp - done!
√ Downloading and extracting sidemenu starter - done!

? Would you like to integrate your new app with Cordova to target native iOS and Android? Yes
√ Personalizing ionic.config.json and package.json - done!

ionic integrations enable cordova --quiet
√ Downloading integration cordova - done!
√ Copying integrations files to project - done!
[OK] Added cordova integration!

Installing dependencies may take several minutes.

  • IONIC DEVAPP *

Speed up development with the Ionic DevApp, our fast, on-device testing mobile app

  • Test on iOS and Android without Native SDKs
    
  • LiveReload for instant style and JS updates
    

️–> Install DevApp: Ionic DevApp - Appflow

npm i
× Running command - failed!
[ERROR] npm ERR! path D:\mnk\RnD\ionic\mkApp\node_modules\ionic-angular

    npm ERR! code ENOENT
    npm ERR! errno -4058
    npm ERR! syscall rename
    npm ERR! enoent ENOENT: no such file or directory, rename 'D:\mnk\RnD\ionic\mkApp\node_modules\ionic-angular' ->
    'D:\mnk\RnD\ionic\mkApp\node_modules\.ionic-angular.DELETE'
    npm ERR! enoent This is related to npm not being able to find a file.
    npm ERR! enoent

    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:\Users\xyz\AppData\Roaming\npm-cache\_logs\2018-01-01T22_06_48_554Z-debug.log

D:\mnk\RnD\ionic>cd mkApp

D:\mnk\RnD\ionic\mkApp>ionic info
[ERROR] Error with .\node_modules\ionic-angular\package.json file: FILE_NOT_FOUND

cli packages: (C:\Users\xyz\AppData\Roaming\npm\node_modules)

@ionic/cli-utils  : 1.19.0
ionic (Ionic CLI) : 3.19.0

global packages:

cordova (Cordova CLI) : 8.0.0

local packages:

@ionic/app-scripts : 3.1.6
Cordova Platforms  : none
Ionic Framework    : not installed

System:

Node : v8.9.3
npm  : 5.5.1
OS   : Windows 10

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : pro

D:\mnk\RnD\ionic\mkApp>

You haven’t installed Ionic. So whatever you tried to do here did not work.

Thanks for the reply.
This is very interesting. I had followed the steps on Getting Started:

  1. Installed Node.Js

  2. then ran > npm install -g cordova ionic

I got some warnings but based on my search, I understood that those were only relevant for Mac whereas I am running Win10.

Any hint what I am missing in the above two steps or how to verify my install?

  1. Quickest way to verify your install would be executing the command
ionic

in your console and see if you get a response like this.

   _             _
  (_) ___  _ __ (_) ___
  | |/ _ \| '_ \| |/ __|
  | | (_) | | | | | (__
  |_|\___/|_| |_|_|\___|  CLI 3.19.0


  Usage:

    $ ionic <command> [<args>] [--help] [--verbose] [--quiet] [--no-interactive] [--confirm] [options]

  Global Commands:

    config <subcommand> ...... Manage CLI and project config values (subcommands: get, set)
    docs ..................... Open the Ionic documentation website
    info ..................... Print system/environment info
    login .................... Login with your Ionic ID
    signup ................... Create an Ionic account
    start .................... Create a new project
    telemetry ................ (deprecated) Opt in and out of telemetry

  Project Commands:

    You are not in a project directory.

  1. Check your (global) npm folder if the packages are there
C:\Users\Mamoon\AppData\Romaing\npm\

I had done that already. It still gives correct result.
D:\mnk\RnD\ionic>ionic
_ _
() ___ _ __ () ___
| |/ _ | '_ | |/ |
| | (_) | | | | | (

||___/|| |||___| CLI PRO 3.19.0

Usage:

$ ionic <command> [<args>] [--help] [--verbose] [--quiet] [--no-interactive] [--confirm] [options]

Global Commands:

config <subcommand> ...... Manage CLI and project config values (subcommands: get, set)
docs ..................... Open the Ionic documentation website
info ..................... Print system/environment info
login .................... Login with your Ionic ID
signup ................... Create an Ionic account
ssh <subcommand> ......... Commands for configuring SSH keys (subcommands: add, delete, generate, list, setup, use)
start .................... Create a new project
telemetry ................ (deprecated) Opt in and out of telemetry

Project Commands:

You are not in a project directory.

BTW; my understanding is that ionic-cli != ionic-angular

I feel, I am missing some specific module/lib .

Also, I see over 200 modules in C:\Users\Mamoon\AppData\Roaming\npm\node_modules\ionic\node_modules

Try to manually delete the node_modules folder IN your PROJECT. Then try npm install again in your project folder. Then try again ?..

Still the same error, as I posted in first post.

Ok. Last try:
Reinstall your global packages of cordova and ionic and your project packages (or just start a new project)

  1. again delete your node_modules folder in your project

  2. delete the global cordova and ionic packages
    npm uninstall -g cordova ionic
    npm cache clear --force

  3. check if all files regarding to cordova and ionic are deleted in your npm folder
    C:Users\Mamoon\AppData\Roaming\npm -> delete all except npm/npx
    Also check the node_modules folder -> delete all except npm

  4. reboot your computer

  5. npm install -g cordova ionic

  6. check if packages are installed
    ionic -v

  7. in your project folder try npm install again

1 Like

I gave one more try and it almost failed till when I ran the Install again in the totally new project.
Here is the full output:

D:\mnk\RnD\ionic>ionic start helloApp blank
√ Creating directory .\helloApp - done!
√ Downloading and extracting blank starter - done!

? Would you like to integrate your new app with Cordova to target native iOS and Android? Yes
√ Personalizing ionic.config.json and package.json - done!

ionic integrations enable cordova --quiet
√ Downloading integration cordova - done!
√ Copying integrations files to project - done!
[OK] Added cordova integration!
[ERROR] Error with .\helloApp\node_modules\ionic-angular\package.json file: FILE_NOT_FOUND
[ERROR] Error with .\helloApp\node_modules@ionic\app-scripts\package.json file: FILE_NOT_FOUND

Installing dependencies may take several minutes.

  • IONIC DEVAPP *

Speed up development with the Ionic DevApp, our fast, on-device testing mobile app

  • Test on iOS and Android without Native SDKs
    
  • LiveReload for instant style and JS updates
    

️–> Install DevApp: Ionic DevApp - Appflow

npm i
× Running command - failed!
[ERROR] npm ERR! path D:\mnk\RnD\ionic\helloApp\node_modules\ionic-angular

    npm ERR! code ENOENT
    npm ERR! errno -4058
    npm ERR! syscall rename
    npm ERR! enoent ENOENT: no such file or directory, rename 'D:\mnk\RnD\ionic\helloApp\node_modules\ionic-angular'
    -> 'D:\mnk\RnD\ionic\helloApp\node_modules\.ionic-angular.DELETE'
    npm ERR! enoent This is related to npm not being able to find a file.
    npm ERR! enoent

    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:\Users\Mamoon\AppData\Roaming\npm-cache\_logs\2018-01-03T22_47_16_561Z-debug.log

D:\mnk\RnD\ionic>cd helloApp

D:\mnk\RnD\ionic\helloApp>npm install

node-sass@4.5.3 install D:\mnk\RnD\ionic\helloApp\node_modules\node-sass
node scripts/install.js

Cached binary found at C:\Users\Mamoon\AppData\Roaming\npm-cache\node-sass\4.5.3\win32-x64-57_binding.node

uglifyjs-webpack-plugin@0.4.6 postinstall D:\mnk\RnD\ionic\helloApp\node_modules\uglifyjs-webpack-plugin
node lib/post_install.js

node-sass@4.5.3 postinstall D:\mnk\RnD\ionic\helloApp\node_modules\node-sass
node scripts/build.js

Binary found at D:\mnk\RnD\ionic\helloApp\node_modules\node-sass\vendor\win32-x64-57\binding.node
Testing binary
Binary is fine
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})

added 6 packages and updated 537 packages in 155.529s

D:\mnk\RnD\ionic\helloApp>

Now I want to understand,

  1. what has gone wrong with the -g option
  2. Is it normal that I need to install again in the project after starting it?
1 Like

I’m getting the same error.

The latest version node.js, ionic, angular are installed but it says ionic-angular is not found?

[ERROR] Error with .\project9\node_modules\ionic-angular\package.json file: FILE_NOT_FOUND
[ERROR] Error with .\project9\node_modules\@ionic\app-scripts\package.json file: FILE_NOT_FOUND

This error started to happen after using this command:

npm install --save @angular/core@latest

It’s now fixed by reinstalling node.js using its original .msi installer downloaded from node site.
I had to install latest ionic CLI as well… it took me an hour+ to fix the whole issue.