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

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

Open
ohmnoms opened this issue Feb 27, 2024 · 0 comments
Open

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

ohmnoms opened this issue Feb 27, 2024 · 0 comments

Comments

@ohmnoms
Copy link

ohmnoms commented Feb 27, 2024

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.

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