Open kamrankamrani opened 1 month ago
I'm experiencing the same problem—the plugin isn't recognized at all when running npx cap sync. I've tried several plugins, and this is the only one that isn't recognized. Another odd aspect is the plugin's version, 1.0.2, which doesn't follow the same versioning pattern as other Capacitor plugins. Could this be the reason it's not recognized?
@poulainpi same for me. There is a example-app
folder inside the repo. I tried to run that app but I will get this error:
Error: Failed to scan for dependencies from entries:
/Users/kamran/Work/capacitor-os-inappbrowser-dev/example-app/index.html
✘ [ERROR] Failed to resolve entry for package "@capacitor/inappbrowser". The package may have incorrect main/module/exports specified in its package.json. [plugin vite:dep-scan]
node_modules/esbuild/lib/main.js:1225:21:
1225 │ let result = await callback({
╵ ^
at packageEntryFailure (file:///Users/kamran/Work/capacitor-os-inappbrowser-dev/example-app/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:46541:15)
at resolvePackageEntry (file:///Users/kamran/Work/capacitor-os-inappbrowser-dev/example-app/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:46538:3)
at tryNodeResolve (file:///Users/kamran/Work/capacitor-os-inappbrowser-dev/example-app/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:46354:16)
at ResolveIdContext.resolveId (file:///Users/kamran/Work/capacitor-os-inappbrowser-dev/example-app/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:46104:19)
at PluginContainer.resolveId (file:///Users/kamran/Work/capacitor-os-inappbrowser-dev/example-app/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:48919:17)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async resolve (file:///Users/kamran/Work/capacitor-os-inappbrowser-dev/example-app/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:49530:22)
at async file:///Users/kamran/Work/capacitor-os-inappbrowser-dev/example-app/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:49692:28
at async requestCallbacks.on-resolve (/Users/kamran/Work/capacitor-os-inappbrowser-dev/example-app/node_modules/esbuild/lib/main.js:1225:22)
at async handleRequest (/Users/kamran/Work/capacitor-os-inappbrowser-dev/example-app/node_modules/esbuild/lib/main.js:647:11)
This error came from the "onResolve" callback registered here:
node_modules/esbuild/lib/main.js:1150:20:
1150 │ let promise = setup({
╵ ^
at setup (file:///Users/kamran/Work/capacitor-os-inappbrowser-dev/example-app/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:49680:13)
at handlePlugins (/Users/kamran/Work/capacitor-os-inappbrowser-dev/example-app/node_modules/esbuild/lib/main.js:1150:21)
at buildOrContextImpl (/Users/kamran/Work/capacitor-os-inappbrowser-dev/example-app/node_modules/esbuild/lib/main.js:873:5)
at Object.buildOrContext (/Users/kamran/Work/capacitor-os-inappbrowser-dev/example-app/node_modules/esbuild/lib/main.js:699:5)
at /Users/kamran/Work/capacitor-os-inappbrowser-dev/example-app/node_modules/esbuild/lib/main.js:2032:68
at new Promise (<anonymous>)
at Object.context (/Users/kamran/Work/capacitor-os-inappbrowser-dev/example-app/node_modules/esbuild/lib/main.js:2032:27)
at Object.context (/Users/kamran/Work/capacitor-os-inappbrowser-dev/example-app/node_modules/esbuild/lib/main.js:1874:58)
at prepareEsbuildScanner (file:///Users/kamran/Work/capacitor-os-inappbrowser-dev/example-app/node_modules/vite/dist/node/chunks/dep-BzOvws4Y.js:49477:24)
The plugin "vite:dep-scan" was triggered by this import
src/pages/Home.tsx:2:206:
2 │ ...ndroidViewStyle, AndroidAnimation } from '@capacitor/inappbrowser';
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~
at failureErrorWithLog (/Users/kamran/Work/capacitor-os-inappbrowser-dev/example-app/node_modules/esbuild/lib/main.js:1472:15)
at /Users/kamran/Work/capacitor-os-inappbrowser-dev/example-app/node_modules/esbuild/lib/main.js:945:25
at runOnEndCallbacks (/Users/kamran/Work/capacitor-os-inappbrowser-dev/example-app/node_modules/esbuild/lib/main.js:1315:45)
at buildResponseToResult (/Users/kamran/Work/capacitor-os-inappbrowser-dev/example-app/node_modules/esbuild/lib/main.js:943:7)
at /Users/kamran/Work/capacitor-os-inappbrowser-dev/example-app/node_modules/esbuild/lib/main.js:955:9
at new Promise (<anonymous>)
at requestCallbacks.on-end (/Users/kamran/Work/capacitor-os-inappbrowser-dev/example-app/node_modules/esbuild/lib/main.js:954:54)
at handleRequest (/Users/kamran/Work/capacitor-os-inappbrowser-dev/example-app/node_modules/esbuild/lib/main.js:647:17)
at handleIncomingPacket (/Users/kamran/Work/capacitor-os-inappbrowser-dev/example-app/node_modules/esbuild/lib/main.js:672:7)
at Socket.readFromStdout (/Users/kamran/Work/capacitor-os-inappbrowser-dev/example-app/node_modules/esbuild/lib/main.js:600:7)
I ran npm install
in root file. Am I missing something here?
I am facing this issue. Any ideas?
I did following steps: