Skip to content

Can't start with browser: "Ionic server" "Error cannot set/" #24

@Eminent-Web

Description

@Eminent-Web

These Imports don't work. I can't implement from "node_modules"
If i change the Import of
import { CameraSource, CameraResultType, Photo } from '@capacitor/core';
to
import { CameraSource, CameraResultType, Photo } from '@capacitor/camera'; this will work.

The following import:
import { TextDetector, TextDetection, ImageOrientation } from 'cap-ml';
doesn't work either, im not sure why!? I also tried: "npm install cap-ml". But it doesn't change my error.

Error message:

Cannot find module 'cap-ml' or its corresponding type declarations.ts(2307)


The last thing that doesn't work is:
import { Plugins } from '@capacitor/core';
const { Camera } = Plugins;

Error message:

'Plugins' is deprecated.ts(6385)
global.d.ts(5, 4): The declaration was marked as deprecated here.


Versions:

Angular CLI: 12.1.0
Node: 14.17.1
Package Manager: npm 6.14.13
OS: win32 x64

Angular:
...

Package Version

@angular-devkit/architect 0.1201.0 (cli-only)
@angular-devkit/core 12.1.0 (cli-only)
@angular-devkit/schematics 12.1.0 (cli-only)
@schematics/angular 12.1.0 (cli-only)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions