I tried to run an Ionic 3 project from existing files using not C++ but Apache/Cordova and i am getting these errors. Idid a Typescript project works fine. But Cordova won't run with Javascript?

Severity Code Description Project File Line Suppression State
Error TS2304 Build:Cannot find name 'object'. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\compiler\src\compile_metadata.d.ts 168
Warning No compiler log specified, 'Clean' won't work. ionic2 C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\ApacheCordovaTools\vs-mda-targets\Microsoft.MDA.FileMirroring.targets 320
Error TS1139 Build:Type parameter declaration expected. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\platform-browser\src\browser\transfer_state.d.ts 34
Error TS1109 Build:Expression expected. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\platform-browser\src\browser\transfer_state.d.ts 34
Error TS1128 Build:Declaration or statement expected. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\platform-browser\src\browser\transfer_state.d.ts 34
Error TS2304 Build:Cannot find name 'string'. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\platform-browser\src\browser\transfer_state.d.ts 34
Error TS2304 Build:Cannot find name 'object'. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\compiler\src\compile_metadata.d.ts 137
Error TS2304 Build:Cannot find name 'object'. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\compiler\src\compile_metadata.d.ts 167
Error TS2304 Build:Cannot find name 'object'. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\compiler\src\compile_metadata.d.ts 193
Error TS2304 Build:Cannot find name 'object'. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\compiler\src\compile_metadata.d.ts 194
Error TS2304 Build:Cannot find name 'object'. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\compiler\src\compile_metadata.d.ts 224
Error TS2304 Build:Cannot find name 'object'. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\compiler\src\compile_metadata.d.ts 225
Error TS2304 Build:Cannot find name 'object'. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\compiler\src\compile_metadata.d.ts 255
Error TS2304 Build:Cannot find name 'object'. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\compiler\src\compile_metadata.d.ts 256
Error TS2304 Build:Cannot find name 'object'. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\compiler\src\core.d.ts 12
Error TS2304 Build:Cannot find name 'object'. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\compiler\src\jit\compiler.d.ts 20
Error TS2304 Build:Cannot find name 'object'. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\compiler\src\jit\compiler.d.ts 21
Error TS2304 Build:Cannot find name 'object'. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\compiler\src\jit\compiler.d.ts 49
Error TS2304 Build:Cannot find name 'object'. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\compiler\src\jit\compiler.d.ts 50
Error TS2304 Build:Cannot find name 'object'. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\compiler\src\jit\compiler.d.ts 53
Error TS2304 Build:Cannot find name 'key'. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\platform-browser\src\browser\transfer_state.d.ts 34
Error TS2693 Build:'StateKey' only refers to a type, but is being used as a value here. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\platform-browser\src\browser\transfer_state.d.ts 34
Error TS1005 Build:';' expected. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\platform-browser\src\browser\transfer_state.d.ts 34
Error TS1005 Build:',' expected. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\platform-browser\src\browser\transfer_state.d.ts 34
Error TS1005 Build:')' expected. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\platform-browser\src\browser\transfer_state.d.ts 34
Error TS1005 Build:'(' expected. ionic2 C:\Users\Simon\AppData\Local\Microsoft\Windows\INetCookies\Desktop\Various Scripts\ionic2\node_modules\@angular\platform-browser\src\browser\transfer_state.d.ts 34

Dani AI

Generated

Short expert summary for (and follow-up for ): the build symptoms point at two independent problems you can fix quickly — a TypeScript/tooling mismatch (the Angular/Ionic declaration files use newer TypeScript language features) and a missing/incorrect Cordova/npm setup (project metadata or node_modules not present). Visual Studio’s Apache/Cordova tooling (TACO) is also no longer a first-class path forward in newer VS releases, so the VS workflow can be fragile for modern Ionic projects.

Practical steps to get the repo building locally (do these from the project root that contains package.json/config.xml):

  1. Restore npm deps: run

    npm install

    This usually fixes the “module not found” diagnostics because it re-creates node_modules from package.json.

  2. Verify it is a Cordova project: confirm a top-level config.xml and a www folder (or run the Ionic/Cordova build that produces them). If Cordova commands complain about the working directory, the project structure is the issue — create/restore the missing files or run the Ionic CLI to re-generate them. Then add platforms from the CLI:

    cordova platform add android

    CLI runs are more reliable than VS GUI for platform/plugin operations.

  3. Fix the TypeScript compiler mismatch: check package.json for the TypeScript version your Ionic/Angular code expects and install that locally (npm install --save-dev typescript@<version>), or install the matching TypeScript SDK that Visual Studio will use. You can also set a project TypeScriptToolsVersion or prefer CLI builds so MSBuild isn’t invoking an older tsc. The object type and other lib changes were added in TS 2.2, so match at least that where needed.

If problems persist, try the Ionic/Cordova CLI + Visual Studio Code workflow (more current tooling for Ionic) or build from the command line and open an issue with the repo author as suggested.

Recommended Answers

All 6 Replies

It looks to me that this project is abandoned. Why do I write this? Reading many pages at the site have outdated references like Android 4.x at and many other pages there.

To me this and more would have me never start such an endeavor on this platform.

commented: No it's not abandoned. And there is nothing about any outdated refference +0

I went back to the pages and areas do look dated. Especially the references to Android 4.x. which is about 4 years ago.

I didn't want to upset you but the docs definitely have the feel that those that run this project may have moved on.

Here's my advice. Hunt down who runs this project and try to contact them directly about where to get support.

That page is by just one person and it appears you can contact him to ask if he has built it on your selection of OS, VS and more.
In this case, a fine reason to ask the author.

I think i have to connect with a database

Cannot find module, should i install something?

Severity Code Description Project File Line Suppression State
Error TS2307 Cannot find module '@angular/core'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\pages\login\login.ts 1 Active
Error Error: Current working directory is not a Cordova-based project. ionicLast1 1
Error TS2307 Cannot find module 'ionic-angular'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\app\app.component.ts 2 Active
Error TS2307 Cannot find module 'ionic-angular'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\app\app.module.ts 3 Active
Error TS2307 Cannot find module 'ionic-angular'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\pages\about\about.ts 2 Active
Error TS2307 Cannot find module 'ionic-angular'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\pages\contact\contact.ts 2 Active
Error TS2307 Cannot find module 'ionic-angular'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\pages\home\home.ts 2 Active
Error TS2307 Cannot find module 'ionic-angular'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\pages\login\login.module.ts 2 Active
Error TS2307 Cannot find module 'ionic-angular'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\pages\login\login.ts 2 Active
Error TS2307 Cannot find module 'ionic-angular'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\pages\signup\signup.module.ts 2 Active
Error TS2307 Cannot find module 'ionic-angular'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\pages\signup\signup.ts 2 Active
Error TS2307 Cannot find module 'ionic-angular'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\pages\welcome\welcome.module.ts 2 Active
Error TS2307 Cannot find module 'ionic-angular'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\pages\welcome\welcome.ts 2 Active
Error TS2307 Cannot find module 'ionic-angular'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\providers\common.ts 2 Active
Error TS2307 Cannot find module 'ionic-angular'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\providers\split-pane.ts 2 Active
Error TS2307 Cannot find module 'angular2-moment'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\app\app.module.ts 20 Active
Error TS2307 Cannot find module 'angular-linky'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\app\app.module.ts 21 Active
Error TS2307 Cannot find module '@ionic-native/status-bar'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\app\app.component.ts 3 Active
Error TS2307 Cannot find module '@ionic-native/status-bar'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\app\app.module.ts 17 Active
Error TS2307 Cannot find module '@ionic-native/splash-screen'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\app\app.component.ts 4 Active
Error TS2307 Cannot find module '@ionic-native/splash-screen'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\app\app.module.ts 18 Active
Error TS2307 Cannot find module '@angular/platform-browser-dynamic'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\app\main.ts 1 Active
Error TS2307 Cannot find module '@angular/platform-browser'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\app\app.module.ts 2 Active
Error TS2307 Cannot find module '@angular/http'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\app\app.module.ts 8 Active
Error TS2307 Cannot find module '@angular/http'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\providers\auth-service.ts 2 Active
Error TS2307 Cannot find module '@angular/core'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\app\app.component.ts 1 Active
Error TS2307 Cannot find module '@angular/core'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\app\app.module.ts 1 Active
Error TS2307 Cannot find module '@angular/core'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\pages\about\about.ts 1 Active
Error TS2307 Cannot find module '@angular/core'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\pages\contact\contact.ts 1 Active
Error TS2307 Cannot find module '@angular/core'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\pages\home\home.ts 1 Active
Error TS2307 Cannot find module '@angular/core'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\pages\login\login.module.ts 1 Active
Error TS2307 Cannot find module '@angular/core'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\pages\signup\signup.module.ts 1 Active
Error TS2307 Cannot find module '@angular/core'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\pages\signup\signup.ts 1 Active
Error TS2307 Cannot find module '@angular/core'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\pages\tabs\tabs.ts 1 Active
Error TS2307 Cannot find module '@angular/core'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\pages\welcome\welcome.module.ts 1 Active
Error TS2307 Cannot find module '@angular/core'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\pages\welcome\welcome.ts 1 Active
Error TS2307 Cannot find module '@angular/core'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\providers\auth-service.ts 1 Active
Error TS2307 Cannot find module '@angular/core'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\providers\common.ts 1 Active
Error TS2307 Cannot find module '@angular/core'. ionic-restful-authentication-master (tsconfig project) C:\Users\Simon\Cookies\Desktop\Various Scripts\ioniclast\ionic-restful-authentication-master\src\providers\split-pane.ts 1 Active
Error Adding the Cordova platform failed ionicLast1 1

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.