PnX-SI/gn_module_import

Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):

philw1001 opened this issue · 6 comments

Bonjour

Lorsque j'installe le module IMPORT
J'ai cette erreur

../external_modules/import/frontend/app/gnModule.module.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):

Error: /home/geonatureadmin/geonature/external_modules/import/frontend/app/gnModule.module.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.

    at /home/geonatureadmin/geonature/frontend/node_modules/@ngtools/webpack/src/ivy/loader.js:59:26

J'ai la version 2.10.4

(venv) geonatureadmin@vmgeonature:~/geonature$ cat VERSION 
2.10.4
(venv) geonatureadmin@vmgeonature:~/geonature$ cd download/
(venv) geonatureadmin@vmgeonature:~/geonature/download$ ls -l
lrwxrwxrwx  1 geonatureadmin geonatureadmin   22 26 déc.  10:35 gn_module_import -> gn_module_import-2.0.2
drwxr-xr-x 10 geonatureadmin geonatureadmin 4096  9 nov.  20:09 gn_module_import-2.0.2
drwxr-xr-x 10 geonatureadmin geonatureadmin 4096 14 déc.  22:55 gn_module_import-2.0.3

La commande utilisée est la suivante

cd
source geonature/backend/venv/bin/activate
geonature install-packaged-gn-module /home/geonatureadmin/geonature/download/gn_module_import IMPORT
deactivate
sudo systemctl restart geonature
sudo systemctl restart geonature-worker
cd geonature/frontend
nvm use
npm run build

Bonjour,
Pouvez-vous essayer de relancer la commande geonature generate-frontend-tsconfig-app (après avoir sourcé le venv) puis de relancer le rebuild du frontend (la partie cd geonature/frontend && nvm use && nvm run build) ?
Si cela ne fonctionne toujours pas, pouvez vous envoyer votre fichier geonature/frontend/src/tsconfig.app.json

bonjour

Merci pour votre réactivité
J'ai la même erreur

Commandes exécutées

cd
source geonature/backend/venv/bin/activate
geonature generate-frontend-tsconfig-app
Generating tsconfig.app.json
...ok


(venv) geonatureadmin@vmgeonature:~$ cat  geonature/frontend/src/tsconfig.app.json
{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    "outDir": "../out-tsc/app",
    "module": "es2020",
    "types": [
      "node"
    ]
  },

  "include": [
    "main.ts",
    "polyfills.ts",
    "*.d.ts",
    "**/*"

    ,"/home/geonatureadmin/geonature/external_modules/occtax/frontend/app/*.ts"
    ,"/home/geonatureadmin/geonature/external_modules/occtax/frontend/app/**/*.ts"
    ,"/home/geonatureadmin/geonature/external_modules/occhab/frontend/app/*.ts"
    ,"/home/geonatureadmin/geonature/external_modules/occhab/frontend/app/**/*.ts"
    ,"/home/geonatureadmin/geonature/external_modules/validation/frontend/app/*.ts"
    ,"/home/geonatureadmin/geonature/external_modules/validation/frontend/app/**/*.ts"
    ,"/home/geonatureadmin/geonature/external_modules/import/frontend/app/*.ts"
    ,"/home/geonatureadmin/geonature/external_modules/import/frontend/app/**/*.ts"
    ,"/home/geonatureadmin/geonature/external_modules/monitorings/frontend/app/*.ts"
    ,"/home/geonatureadmin/geonature/external_modules/monitorings/frontend/app/**/*.ts"
  ],

  "exclude": [
    "test.ts",
    "**/*.spec.ts"
    ,"/home/geonatureadmin/geonature/external_modules/occtax/frontend/app/**/*.spec.ts"
    ,"/home/geonatureadmin/geonature/external_modules/occhab/frontend/app/**/*.spec.ts"
    ,"/home/geonatureadmin/geonature/external_modules/validation/frontend/app/**/*.spec.ts"
    ,"/home/geonatureadmin/geonature/external_modules/import/frontend/app/**/*.spec.ts"
    ,"/home/geonatureadmin/geonature/external_modules/monitorings/frontend/app/**/*.spec.ts"
  ],

}

(venv) geonatureadmin@vmgeonature:~$ ls -l /home/geonatureadmin/geonature/external_modules/import/frontend/app/*.tss

-rw-r--r-- 1 geonatureadmin geonatureadmin 4897  9 nov.  20:09 /home/geonatureadmin/geonature/external_modules/import/frontend/app/gnModule.module.ts
-rw-r--r-- 1 geonatureadmin geonatureadmin 2478 26 déc.  11:14 /home/geonatureadmin/geonature/external_modules/import/frontend/app/module.config.ts

(venv) geonatureadmin@vmgeonature:~$ ls -l /home/geonatureadmin/geonature/external_modules/import/frontend/app/**/*.ts
-rw-r--r-- 1 geonatureadmin geonatureadmin  124  9 nov.  20:09 /home/geonatureadmin/geonature/external_modules/import/frontend/app/models/cruved.model.ts
-rw-r--r-- 1 geonatureadmin geonatureadmin   99  9 nov.  20:09 /home/geonatureadmin/geonature/external_modules/import/frontend/app/models/enums.model.ts
-rw-r--r-- 1 geonatureadmin geonatureadmin 2930  9 nov.  20:09 /home/geonatureadmin/geonature/external_modules/import/frontend/app/models/import.model.ts
-rw-r--r-- 1 geonatureadmin geonatureadmin  687  9 nov.  20:09 /home/geonatureadmin/geonature/external_modules/import/frontend/app/models/mapping.model.ts
-rw-r--r-- 1 geonatureadmin geonatureadmin  630  9 nov.  20:09 /home/geonatureadmin/geonature/external_modules/import/frontend/app/services/csv-export.service.ts
-rw-r--r-- 1 geonatureadmin geonatureadmin 7704  9 nov.  20:09 /home/geonatureadmin/geonature/external_modules/import/frontend/app/services/data.service.ts

(venv) geonatureadmin@vmgeonature:~$ ls -l /home/geonatureadmin/geonature/external_modules/import/frontend/app/**/*.spec.ts
ls: impossible d'accéder à '/home/geonatureadmin/geonature/external_modules/import/frontend/app/**/*.spec.ts': Aucun fichier ou dossier de ce type

Est-il possible d’avoir les logs complet de la compilation ?

Bonjour

Voici les logs

geonatureadmin@vmgeonature:~$     cd geonature/frontend

    nvm use

    npm run build

Found '/home/geonatureadmin/geonature/frontend/.nvmrc' with version <v16.13.2>

Now using node v16.13.2 (npm v8.1.2)



> geonature@0.0.0 build

> ng build --aot=false --build-optimizer=false --configuration production



Warning: Support was requested for IE 11 in the project's browserslist configuration. IE 11 support is deprecated since Angular v12.

For more information, see https://angular.io/guide/browser-support

✔ Browser application bundle generation complete.



Warning: /home/geonatureadmin/geonature/frontend/src/app/app.module.ts depends on 'angular2-chartjs'. CommonJS or AMD dependencies can cause optimization bailouts.

For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies



Warning: /home/geonatureadmin/geonature/frontend/src/app/app.module.ts depends on 'ng2-cookies'. CommonJS or AMD dependencies can cause optimization bailouts.

For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies



Warning: /home/geonatureadmin/geonature/frontend/src/app/metadataModule/services/metadata-search-form.service.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.



Warning: /home/geonatureadmin/geonature/frontend/src/app/syntheseModule/services/form.service.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.



Warning: /home/geonatureadmin/geonature/frontend/src/app/syntheseModule/services/store.service.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.



Warning: /home/geonatureadmin/geonature/frontend/src/app/syntheseModule/synthese-results/synthese-list/synthese-info-obs/modal-info-obs.component.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.



Warning: /home/geonatureadmin/geonature/frontend/src/environments/environment.prod.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.



Warning: /home/geonatureadmin/geonature/frontend/src/external_assets/import/frontend/app/components/delete-modal/delete-modal.component.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.



Warning: /home/geonatureadmin/geonature/frontend/src/external_assets/import/frontend/app/components/import_errors/import_errors.component.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.



Warning: /home/geonatureadmin/geonature/frontend/src/external_assets/import/frontend/app/components/import_list/import-list.component.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.



Warning: /home/geonatureadmin/geonature/frontend/src/external_assets/import/frontend/app/components/import_process/content-mapping-step/content-mapping-step.component.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.



Warning: /home/geonatureadmin/geonature/frontend/src/external_assets/import/frontend/app/components/import_process/decode-file-step/decode-file-step.component.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.



Warning: /home/geonatureadmin/geonature/frontend/src/external_assets/import/frontend/app/components/import_process/fields-mapping-step/fields-mapping-step.component.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.



Warning: /home/geonatureadmin/geonature/frontend/src/external_assets/import/frontend/app/components/import_process/footer-stepper/footer-stepper.component.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.



Warning: /home/geonatureadmin/geonature/frontend/src/external_assets/import/frontend/app/components/import_process/import-process.component.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.



Warning: /home/geonatureadmin/geonature/frontend/src/external_assets/import/frontend/app/components/import_process/import-process.interface.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.



Warning: /home/geonatureadmin/geonature/frontend/src/external_assets/import/frontend/app/components/import_process/import-process.resolver.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.



Warning: /home/geonatureadmin/geonature/frontend/src/external_assets/import/frontend/app/components/import_process/import-process.service.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.



Warning: /home/geonatureadmin/geonature/frontend/src/external_assets/import/frontend/app/components/import_process/import-step/import-step.component.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.



Warning: /home/geonatureadmin/geonature/frontend/src/external_assets/import/frontend/app/components/import_process/stepper/stepper.component.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.



Warning: /home/geonatureadmin/geonature/frontend/src/external_assets/import/frontend/app/components/import_process/upload-file-step/upload-file-step.component.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.



Warning: /home/geonatureadmin/geonature/frontend/src/external_assets/import/frontend/app/components/import_report/import_report.component.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.



Warning: /home/geonatureadmin/geonature/frontend/src/external_assets/import/frontend/app/components/modal_dataset/import-modal-dataset.component.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.



Warning: /home/geonatureadmin/geonature/frontend/src/external_assets/import/frontend/app/gnModule.module.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.



Warning: /home/geonatureadmin/geonature/frontend/src/external_assets/import/frontend/app/models/cruved.model.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.



Warning: /home/geonatureadmin/geonature/frontend/src/external_assets/import/frontend/app/models/enums.model.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.



Warning: /home/geonatureadmin/geonature/frontend/src/external_assets/import/frontend/app/models/import.model.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.

Warning: /home/geonatureadmin/geonature/frontend/src/external_assets/import/frontend/app/models/mapping.model.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.

0mWarning: /home/geonatureadmin/geonature/frontend/src/external_assets/import/frontend/app/module.config.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.

Warning: /home/geonatureadmin/geonature/frontend/src/external_assets/import/frontend/app/services/csv-export.service.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.

Warning: /home/geonatureadmin/geonature/frontend/src/external_assets/import/frontend/app/services/data.service.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.



Warning: /home/geonatureadmin/geonature/frontend/src/external_assets/import/frontend/app/services/mappings/content-mapping.service.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.

Warning: /home/geonatureadmin/geonature/frontend/src/external_assets/import/frontend/app/services/mappings/field-mapping.service.ts is part of the TypeScript compilation but it's unused.

Add only entry points to the 'files' or 'include' properties in your tsconfig.

../external_modules/import/frontend/app/gnModule.module.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):

Error: /home/geonatureadmin/geonature/external_modules/import/frontend/app/gnModule.module.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.

    at /home/geonatureadmin/geonature/frontend/node_modules/@ngtools/webpack/src/ivy/loader.js:59:26

bonjour, j'ai refais une nouvelle installation avec la version 2.11 de geonature. L'installation des modules import et export est OK

OK on ne voit pas le soucis que vous avez eu sur la 2.10 t on ne reproduit pas.
Tant mieux si c'est OK sur la 2.11.0.
Ticket à rouvrir si le soucis se présente encore.