Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error TS2304: Cannot find name 'LinearAccelerationSensor'. #1

Open
ersaurabh101 opened this issue May 10, 2020 · 0 comments
Open

error TS2304: Cannot find name 'LinearAccelerationSensor'. #1

ersaurabh101 opened this issue May 10, 2020 · 0 comments

Comments

@ersaurabh101
Copy link

ersaurabh101 commented May 10, 2020

I am trying to incorporate your tests in my app, but when i am trying to run it using ionic cordova run browser, your project runs absolutely fine but my project gives error

[ng] ERROR in src/app/devicemotion/devicemotion.page.ts:251:33 - error TS2304: Cannot find name 'LinearAccelerationSensor'.
[ng] 251       const accelerometer = new LinearAccelerationSensor();


my `ionic info` below, incase you need

Ionic:

   Ionic CLI                     : 5.4.13 (C:\Users\saurabh\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 5.0.1
   @angular-devkit/build-angular : 0.803.25
   @angular-devkit/schematics    : 8.3.25
   @angular/cli                  : 8.3.25
   @ionic/angular-toolkit        : 2.1.2

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : not available
   Cordova Plugins   : not available

Utility:

   cordova-res : not installed
   native-run  : 0.3.0

System:

   Android SDK Tools : 26.1.1 (C:\Users\saurabh\AppData\Local\Android\Sdk)
   NodeJS            : v12.14.0 (C:\Program Files\nodejs\node.exe)
   npm               : 6.13.4
   OS                : Windows 10

Difference between ionic info of your project and mine, is this the reason for error ? see image below -
https://ibb.co/FhwYdZf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant