Unable to use in esm package. Module not found: Can't resolve '@ionic/pwa-elements/loader/index.js'
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 38/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- nextjs, node.js, react, typescript
- Área
- build-system, tooling
Línea de trabajo
Reproduce el problema con los comandos git clone, checkout, npm install y npm run build-adroid indicados. Empieza con node_modules/@deep-foundation/capacitor-camera/dist/hooks/use-permissions.js e inspecciona los archivos disponibles de @ionic/pwa-elements/loader y los metadatos del paquete. Se considera terminado cuando la compilación ESM resuelve la importación del loader sin errores de resolución de módulos ni de declaraciones.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
freephoenix888@FreePhoenix:~/Programming/deep/deep-memo-app$ npm list @stencil/core
@deep-foundation/[email protected] /home/freephoenix888/Programming/deep/deep-memo-app
└── (empty)
How is stencil related to this package?
I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or https://chat.stenciljs.com
Current behavior:
I got this error:
- info Collecting page data .Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import '/home/freephoenix888/Programming/deep/deep-memo-app/node_modules/@ionic/pwa-elements/loader' is not supported resolving ES modules imported from /home/freephoenix888/Programming/deep/deep-memo-app/node_modules/@deep-foundation/capacitor-camera/dist/hooks/use-permissions.js
Did you mean to import @ionic/pwa-elements/loader/index.cjs.js?
And changed import in capacitor-camera to this:
import { defineCustomElements } from "@ionic/pwa-elements/loader/index.js";
Now I get this error
./node_modules/@deep-foundation/capacitor-camera/dist/hooks/use-permissions.js
Module not found: Can't resolve '@ionic/pwa-elements/loader/index.js'
Note that I have also tried to use this import:
import { defineCustomElements } from "@ionic/pwa-elements/loader/index.cjs.js";
But I got this error because there is no such file:
Could not find a declaration file for module '@ionic/pwa-elements/loader/index.cjs.js'. '/home/freephoenix888/Programming/deep/capacitor-camera/node_modules/@ionic/pwa-elements/loader/index.cjs.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/ionic__pwa-elements` if it exists or add a new declaration (.d.ts) file containing `declare module '@ionic/pwa-elements/loader/index.cjs.js';`ts(7016)
Expected behavior:
Use your package in esm package without the errors described above
Steps to reproduce:
git clone https://github.com/deep-foundation/deep-memo-app &&
cd deep-memo-app &&
git checkout 6f0ef4bb33423028bf22f30ec9fa2ce0987d7ce4 &&
npm install &&
npm run build-adroid
Related code:
Other information:
freephoenix888@FreePhoenix:~/Programming/deep/deep-memo-app$ npx envinfo --system --npmPackages --markdown
## System:
- OS: Linux 5.15 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
- CPU: (12) x64 AMD Ryzen 5 2600 Six-Core Processor
- Memory: 6.67 GB / 7.73 GB
- Container: Yes
- Shell: 5.1.16 - /bin/bash
## npmPackages:
- @capacitor-community/contacts: ^5.0.3 => 5.0.3
- @capacitor-community/electron: ^4.1.2 => 4.1.2
- @capacitor/action-sheet: ^5.0.0 => 5.0.4
- @capacitor/android: ^5.0.0 => 5.0.5
- @capacitor/camera: ^5.0.0 => 5.0.4
- @capacitor/cli: ^5.0.0 => 5.0.5
- @capacitor/clipboard: ^5.0.0 => 5.0.4
- @capacitor/core: ^5.0.0 => 5.0.5
- @capacitor/device: ^5.0.0 => 5.0.4
- @capacitor/dialog: ^5.0.0 => 5.0.4
- @capacitor/geolocation: ^5.0.0 => 5.0.4
- @capacitor/haptics: ^5.0.0 => 5.0.4
- @capacitor/ios: ^5.0.0 => 5.0.5
- @capacitor/local-notifications: ^5.0.0 => 5.0.4
- @capacitor/motion: ^5.0.0 => 5.0.4
- @capacitor/network: ^5.0.0 => 5.0.6
- @capacitor/push-notifications: ^5.0.0 => 5.0.4
- @capacitor/screen-reader: ^5.0.0 => 5.0.4
- @capawesome/capacitor-file-picker: ^5.0.0 => 5.0.0
- @chakra-ui/react: ^2.5.5 => 2.7.1
- @deep-foundation/capacitor-camera: ^1.1.7 => 1.1.7
- @deep-foundation/capacitor-device: ^17.0.3 => 17.0.3
- @deep-foundation/capacitor-motion: ^5.2.0 => 5.2.0
- @deep-foundation/capacitor-network: ^0.1.4 => 0.1.4
- @deep-foundation/capacitor-voice-recorder: ^1.2.1 => 1.2.1
- @deep-foundation/deeplinks: ^0.0.278 => 0.0.278
- @deep-foundation/firebase-push-notification: ^18.2.0 => 18.2.1
- @deep-foundation/react-with-packages-installed: ^0.5.3 => 0.5.3
- @deep-foundation/store: ^0.0.19 => 0.0.19
- @emotion/react: ^11.10.6 => 11.11.1
- @emotion/styled: ^11.10.6 => 11.11.0
- @freephoenix888/deep-map-object: ^3.0.1 => 3.0.1
- @google-cloud/speech: ^5.4.0 => 5.5.0
- @google-cloud/vision: ^3.1.2 => 3.1.3
- @ionic/pwa-elements: ^3.2.2 => 3.2.2
- @kevincobain2000/json-to-html-table: ^1.0.4 => 1.0.4
- @octokit/rest: ^19.0.5 => 19.0.13
- @rjsf/chakra-ui: ^5.6.2 => 5.8.1
- @rjsf/core: ^5.6.2 => 5.8.1
- @rjsf/utils: ^5.6.2 => 5.8.1
- @rjsf/validator-ajv8: ^5.6.2 => 5.8.1
- @types/debug: ^4.1.8 => 4.1.8
- @types/hjson: ^2.4.3 => 2.4.3
- @types/react: ^18.0.33 => 18.2.15
- @types/serviceworker: ^0.0.62 => 0.0.62
- atob: ^2.1.2 => 2.1.2
- az: ^0.2.3 => 0.2.3
- buffer: ^6.0.3 => 6.0.3
- capacitor-voice-recorder: ^5.0.0 => 5.0.0
- case-anything: ^2.1.13 => 2.1.13
- dotenv: ^16.0.3 => 16.3.1
- dotenv-load: ^2.0.1 => 2.0.1
- events: ^3.3.0 => 3.3.0
- firebase: ^9.19.1 => 9.22.2
- framer-motion: ^6.5.1 => 6.5.1
- generate-schema: ^2.6.0 => 2.6.0
- hjson: ^3.2.2 => 3.2.2
- jest: ^29.5.0 => 29.5.0
- next: ^13.4.7 => 13.4.7
- next-env: ^1.1.1 => 1.1.1
- next-pwa: ^5.6.0 => 5.6.0
- next-transpile-modules: ^10.0.0 => 10.0.0
- react: ^18.2.0 => 18.2.0
- react-dom: ^18.2.0 => 18.2.0
- react-json-to-table: ^0.1.7 => 0.1.7
- react-json-view-lite: ^0.9.8 => 0.9.8
- ts-node: ^10.9.1 => 10.9.1
- typescript: 5.0.4 => 5.0.4
- typescript-json-schema: ^0.56.0 => 0.56.0
- uuid: ^9.0.0 => 9.0.0
- yargs: ^17.7.2 => 17.7.2
- Lenguaje dominante
- TypeScript
- Estrellas
- 171
- Forks
- 50
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ionic-team/pwa-elements
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 45/100
ionic-team/pwa-elements#135 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
ionic-team/pwa-elements#133 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
ionic-team/pwa-elements#129 · 5 comentarios · 17 reacciones ·
-
feat: Possibility to translate in the camera plugin when it does not exist.Posiblemente ocupada @imfms la tomó hace 1736 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 48/100
ionic-team/pwa-elements#113 · 3 comentarios ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 38/100
ionic-team/pwa-elements#111 · 1 comentario · 2 reacciones ·
Todos los issues de ionic-team/pwa-elements
Issues similares
-
Unsampled pageload span is profiled when profileLifecycle is 'trace' (browser UI profiling)Posiblemente ocupada @Jxxunnn la tomó hoy. AbiertoBrowser Waiting for: Product Owner
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
getsentry/sentry-javascript#25497 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
e2e-failure ready-to-code
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
redhat-developer/rhdh-plugin-export-overlays#4438 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
resource: destroying a resource calls AbortController.abort() without a reason, creating an AbortError with a stack trace each timePosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoarea: core
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
angular/angular#71422 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug status: needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
facebook/docusaurus#12739 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
factory-active task-identify-harness-labels-done task-identify-issue-type-done
Dificultad 1/5 1-3 horas Aptitud para principiantes 68/100
vercel/ai#23537 · 1 comentario ·
Los mantenedores suelen responder en 1 día