Skip to content

Failed to resolve entry for package "@nativescript/mlkit-core" #61

@ohmnoms

Description

@ohmnoms

Issue

Receiving an error starting my Angular 17 application using NativeScript MLKit on MLKit-Core

Full error message: An unhandled exception occurred: Failed to resolve entry for package "@nativescript/mlkit-core". The package may have incorrect main/module/exports specified in its package.json.

[error] Error: Failed to resolve entry for package "@nativescript/mlkit-core". The package may have incorrect main/module/exports specified in its package.json. at packageEntryFailure (file:///C:/repos/TestApp/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:29443:17) at resolvePackageEntry (file:///C:/repos/TestApp/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:29440:5) at tryNodeResolve (file:///C:/repos/TestApp/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:29210:20) at Context.resolveId (file:///C:/repos/TestApp/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:28978:28) at Object.resolveId (file:///C:/repos/TestApp/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:63987:64) at async file:///C:/repos/TestApp/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:68003:21 at async file:///C:/repos/TestApp/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:64644:20 at async addManuallyIncludedOptimizeDeps (file:///C:/repos/TestApp/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:65837:31) at async createDepsOptimizer (file:///C:/repos/TestApp/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:64885:9) at async initDepsOptimizer (file:///C:/repos/TestApp/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:64785:9) 

I am following the component imports from the barcode-scanning code.

The issue I believe stems from package.json referring to an 'index' main in package.json that is not there. Is there supposed to nbe a main index file? Or am I missing something from this implementation?

Ultimately I am trying to set up MLKit barcode reading via NativeScript in an Angular PWA and aim to use it in a web view if possible.

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