# Unable to run ionic start on an Angular project without capacitor issue

**URL:** <https://forum.ionicframework.com/t/unable-to-run-ionic-start-on-an-angular-project-without-capacitor-issue/229567>\
**Category:** Ionic Angular\
**Created:** [December 14, 2022, 3:36pm UTC](https://forum.ionicframework.com/t/unable-to-run-ionic-start-on-an-angular-project-without-capacitor-issue/229567 "2022-12-14T15:36:35Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![sworley11](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sworley11/32/143834_2.png) [@sworley11](https://forum.ionicframework.com/u/sworley11)\
**Post date:** [December 14, 2022, 3:36pm UTC](https://forum.ionicframework.com/t/unable-to-run-ionic-start-on-an-angular-project-without-capacitor-issue/229567/1 "2022-12-14T15:36:35Z")

</div>

Hello, I am trying to create a new blank ionic angular project, but I am unable to create it in the CLI without this error.

```auto
> capacitor.cmd init ia-proj io.ionic.starter --web-dir www
'Web' is not recognized as an internal or external command,
operable program or batch file.
'Angular\ia-proj\node_modules\.bin\' is not recognized as an internal or external command,
operable program or batch file.
node:internal/modules/cjs/loader:998

```

Which I believe causes this error when I try to run `ionic serve` on the project after it has been created:

```auto
> ionic serve
> ng.cmd run app:serve --host=localhost --port=8100
[ng] 'Web' is not recognized as an internal or external command,
[ng] operable program or batch file.
[ng] 'Angular\ia-proj\node_modules\.bin\' is not recognized as an internal or external command,
[ng] operable program or batch file.
[ng] node:internal/modules/cjs/loader:998

```

Sme more information:  
Ionic CLi version: 6.20.5  
Angular CLI: 15.0.3  
Node: 18.12.1  
Package Manager: npm 8.19.2

I am unsure what is causing this issue and how to fix it or work around it, any help is appreciated.

Edit: I am able to run it with `ng serve`, but I get the exact same error when I try to run `ionic g c recipes`

---

<div class="post-metadata">

**Author:** ![mikrochipkid](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mikrochipkid/32/116956_2.png) [@mikrochipkid](https://forum.ionicframework.com/u/mikrochipkid)\
**Post date:** [December 14, 2022, 7:05pm UTC](https://forum.ionicframework.com/t/unable-to-run-ionic-start-on-an-angular-project-without-capacitor-issue/229567/2 "2022-12-14T19:05:04Z")

</div>

you need to build before serving and then sync.

```auto
ionic build
npx cap sync

```

---

<div class="post-metadata">

**Author:** ![sworley11](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sworley11/32/143834_2.png) [@sworley11](https://forum.ionicframework.com/u/sworley11)\
**Post date:** [December 14, 2022, 7:40pm UTC](https://forum.ionicframework.com/t/unable-to-run-ionic-start-on-an-angular-project-without-capacitor-issue/229567/3 "2022-12-14T19:40:25Z")

</div>

The same error above occurs on `ionic build` and `npx cap sync`.

```auto
'Web' is not recognized as an internal or external command,
operable program or batch file.
'Angular\ia-proj\node_modules\.bin\' is not recognized as an internal or external command,
operable program or batch file.
node:internal/modules/cjs/loader:998

```

---

<div class="post-metadata">

**Author:** ![mikrochipkid](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mikrochipkid/32/116956_2.png) [@mikrochipkid](https://forum.ionicframework.com/u/mikrochipkid)\
**Post date:** [December 14, 2022, 7:48pm UTC](https://forum.ionicframework.com/t/unable-to-run-ionic-start-on-an-angular-project-without-capacitor-issue/229567/4 "2022-12-14T19:48:18Z")

</div>

Delete your node modules, Android, iOS folders and run npm install and then run those commands above. this should fix the issue.

---

<div class="post-metadata">

**Author:** ![sworley11](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sworley11/32/143834_2.png) [@sworley11](https://forum.ionicframework.com/u/sworley11)\
**Post date:** [December 14, 2022, 7:59pm UTC](https://forum.ionicframework.com/t/unable-to-run-ionic-start-on-an-angular-project-without-capacitor-issue/229567/5 "2022-12-14T19:59:12Z")

</div>

Sorry to say, same issue. I deleted the node\_modules folder in the project. There was no iOS or Android folders in the project, and then I ran npm install. After running npm install, then running ionic build, same error. Ngx cap sync, same error as well.

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [December 14, 2022, 8:02pm UTC](https://forum.ionicframework.com/t/unable-to-run-ionic-start-on-an-angular-project-without-capacitor-issue/229567/6 "2022-12-14T20:02:26Z")

</div>

Hey, just getting around to this. What steps could I take to try and reproduce?

---

<div class="post-metadata">

**Author:** ![sworley11](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sworley11/32/143834_2.png) [@sworley11](https://forum.ionicframework.com/u/sworley11)\
**Post date:** [December 14, 2022, 8:25pm UTC](https://forum.ionicframework.com/t/unable-to-run-ionic-start-on-an-angular-project-without-capacitor-issue/229567/7 "2022-12-14T20:25:03Z")

</div>

Hello, I did what was specified in the installation guide.

I already had node and npm installed, so I ran `npm install -g @ionic/cli` in powershell. The installation had no issues.

Then I ran `ionic start`, selected Not to use the wizard, Angular, Blank template, and named the project ia-proj.

During the initialization of the project, I got this error, which is the same error which occurs on any ionic command for me.

```auto
> capacitor.cmd init ia-proj io.ionic.starter --web-dir www
'Web' is not recognized as an internal or external command,
operable program or batch file.
'Angular\ia-proj\node_modules\.bin\' is not recognized as an internal or external command,
operable program or batch file.
node:internal/modules/cjs/loader:998
  throw err;
  ^

Error: Cannot find module 'C:\Users\sworley\Documents\Udemy\@capacitor\cli\bin\capacitor'
    at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Module._load (node:internal/modules/cjs/loader:841:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

```

On `Ionic build`

```auto
ionic build      
> ng.cmd run app:build
'Web' is not recognized as an internal or external command,
operable program or batch file.
'Angular\ia-proj\node_modules\.bin\' is not recognized as an internal or external command,
operable program or batch file.
node:internal/modules/cjs/loader:998
  throw err;
  ^

Error: Cannot find module 'C:\Users\sworley\Documents\Udemy\@angular\cli\bin\ng.js'
    at Module._load (node:internal/modules/cjs/loader:841:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
}

```

My path is set to look for angular and capacitor in C:\Users\sworley\AppData\Roaming\npm\node\_modules@angular\cli\bin and C:\Users\sworley\AppData\Roaming\npm\node\_modules@capacitor\cli\bin respectively, so I do not understand why the build is looking for them in these local folders or how to remedy this.

I hope this is detailed enough, let me know if there is any more info I can provide.

---

<div class="post-metadata">

**Author:** ![sworley11](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sworley11/32/143834_2.png) [@sworley11](https://forum.ionicframework.com/u/sworley11)\
**Post date:** [December 14, 2022, 8:47pm UTC](https://forum.ionicframework.com/t/unable-to-run-ionic-start-on-an-angular-project-without-capacitor-issue/229567/8 "2022-12-14T20:47:33Z")

</div>

A reboot appears to have fixed the issue and allowed the new path variables to be picked up by ionic. I still get this message on `ionic build` and `ionic serve` but it works.

```auto
[ng] 'Web' is not recognized as an internal or external command,
[ng] operable program or batch file.
[ng] 'Angular\ia-proj\node_modules\.bin\' is not recognized as an internal or external command,
[ng] operable program or batch file.

```

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [December 14, 2022, 9:06pm UTC](https://forum.ionicframework.com/t/unable-to-run-ionic-start-on-an-angular-project-without-capacitor-issue/229567/9 "2022-12-14T21:06:53Z")

</div>

I’ll check with the rest of my team to see if they know whats up, as I’m on a mac, so I haven’t tested in powershell

---

<div class="post-metadata">

**Author:** ![sworley11](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sworley11/32/143834_2.png) [@sworley11](https://forum.ionicframework.com/u/sworley11)\
**Post date:** [December 14, 2022, 10:18pm UTC](https://forum.ionicframework.com/t/unable-to-run-ionic-start-on-an-angular-project-without-capacitor-issue/229567/10 "2022-12-14T22:18:54Z")

</div>

Thank you, however I have resolved the issue. The problem was that the computer needed to be rebooted, and the folder name at the top most level could not have spaces in it. I appreciate the response.
