mapasculturais / mapasculturais-base-project

Base para desenvolvimento de temas e plugins
GNU Affero General Public License v3.0
5 stars 12 forks source link

Erro durante pnpm install --recursive #2

Open adaneps opened 1 year ago

adaneps commented 1 year ago

Olá, estou fazendo o deploy do base project e está ocorrendo o seguinte erro:

50.83 ├─┬ karma-jasmine 5.1.0
50.83 │ └── ✕ unmet peer karma@^6.0.0: found 0.10.4
50.83 └─┬ karma-coffee-preprocessor 1.0.1
50.83   └── ✕ unmet peer karma@>=0.11.14: found 0.10.4
50.83
50.84 .../leaflet.fullscreen-master            | Progress: resolved 1, reused 0, downloaded 0, added 0
50.85 .../leaflet.fullscreen-master            |  WARN  deprecated minimatch@0.4.0
50.88 .../leaflet.fullscreen-master            |  +53 +++++
50.99 .../leaflet.fullscreen-master            | Progress: resolved 53, reused 0, downloaded 0, added 53, done
51.21 .../Leaflet.markercluster-master         | Progress: resolved 170, reused 0, downloaded 20, added 170, done
51.58 protected                                | Progress: resolved 684, reused 625, downloaded 0, added 0
52.10 .../BaseV1/assets/vendor/ui-date-master  | Progress: resolved 1, reused 0, downloaded 0, added 0
52.15 .../BaseV1/assets/vendor/ui-date-master  |  WARN  deprecated coffee-script@1.3.3
52.16 .../BaseV1/assets/vendor/ui-date-master  |  WARN  deprecated minimatch@0.2.14
52.20 .../BaseV1/assets/vendor/ui-date-master  |  WARN  deprecated minimatch@0.4.0
52.20 .../BaseV1/assets/vendor/ui-date-master  |  WARN  deprecated chokidar@0.6.3
52.21 .../BaseV1/assets/vendor/ui-date-master  |  WARN  deprecated coffee-script@1.6.3
52.22 .../BaseV1/assets/vendor/ui-date-master  |  WARN  deprecated istanbul@0.1.46
52.22 .../BaseV1/assets/vendor/ui-date-master  |  WARN  deprecated log4js@0.6.38
52.25 .../BaseV1/assets/vendor/ui-date-master  |  WARN  deprecated graceful-fs@1.2.3
52.26 .../BaseV1/assets/vendor/ui-date-master  |  WARN  deprecated mkdirp@0.3.5
52.64 protected                                | Progress: resolved 699, reused 626, downloaded 0, added 0
53.13 .../BaseV1/assets/vendor/ui-date-master  | Progress: resolved 131, reused 0, downloaded 0, added 0
53.41 .../BaseV1/assets/vendor/ui-date-master  |  WARN  deprecated graceful-fs@1.1.14
53.41 .../BaseV1/assets/vendor/ui-date-master  |  WARN  deprecated minimatch@0.3.0
54.42 protected                                | Progress: resolved 708, reused 640, downloaded 0, added 0
54.42 .../BaseV1/assets/vendor/ui-date-master  | Progress: resolved 142, reused 0, downloaded 4, added 0
55.19 protected                                |  -44 ----
55.21 protected                                | Progress: resolved 708, reused 640, downloaded 0, added 0, done
55.47 .../BaseV1/assets/vendor/ui-date-master  | Progress: resolved 145, reused 0, downloaded 9, added 0
56.51 .../BaseV1/assets/vendor/ui-date-master  | Progress: resolved 145, reused 0, downloaded 16, added 0
57.51 .../BaseV1/assets/vendor/ui-date-master  | Progress: resolved 145, reused 0, downloaded 23, added 0
58.51 .../BaseV1/assets/vendor/ui-date-master  | Progress: resolved 145, reused 0, downloaded 27, added 0
59.51 .../BaseV1/assets/vendor/ui-date-master  | Progress: resolved 145, reused 0, downloaded 28, added 0
63.45 .../BaseV1/assets/vendor/ui-date-master  | Progress: resolved 146, reused 0, downloaded 28, added 0
63.96 .../BaseV1/assets/vendor/ui-date-master  | +195 ++++++++++++++++++++
64.50 .../BaseV1/assets/vendor/ui-date-master  | Progress: resolved 195, reused 0, downloaded 31, added 0
65.51 .../BaseV1/assets/vendor/ui-date-master  | Progress: resolved 195, reused 0, downloaded 31, added 58
65.93 .../BaseV1/assets/vendor/ui-date-master  | Progress: resolved 195, reused 0, downloaded 31, added 195, done
67.71 .../chokidar@0.7.1/node_modules/chokidar postinstall$ node setup.js postinstall
68.03 .../chokidar@0.7.1/node_modules/chokidar postinstall: Done
70.02 .../Leaflet.label-master prepublish$ jake
70.14 .../Leaflet.label-master prepublish: sh: 1: jake: not found
70.15 undefined
70.15 /var/www/html/protected/application/themes/BaseV1/assets/vendor/leaflet/lib/leaflet-plugins-updated-2014-07-25/Leaflet.label-master:
70.15  ELIFECYCLE  Command failed.

Adicionei o comando pnpm install -g jake para instalação globalmente ao Dockerfile mas ai ocorre outro erro:

63.98 .../Leaflet.label-master prepublish$ jake
64.51 .../.pnpm/ws@0.4.32/node_modules/ws install$ (node-gyp rebuild 2> builderror.log) || (exit 0)
66.32 .../Leaflet.label-master prepublish: jake aborted.
66.32 .../Leaflet.label-master prepublish: Error: Cannot find module './build/build.js'
66.32 .../Leaflet.label-master prepublish: Require stack:

Estou tentando fazer alguns testes para resolver, mas se alguém passou por isso pode por favor compartilhar a solução ?

Comandos utilizados: sudo ./start.sh Ubuntu 22.04 Docker version 24.0.5 Docker Compose version v2.20.2

Obrigado.

adaneps commented 1 year ago

Verifiquei que os arquivos das libs Leaflet* em BaseV1/assets/vendor/leaflet/lib/leaflet-plugins-updated-2014-07-25/Leaflet estavam diferentes de seus repositórios, principalmente os arquivos de Build do Jake.

Então, fiz o download o do tema BaseV1 do repositório principal dos Mapas Culturais para o diretório Themes do base Project, e removi o bloco Scripts com o build do Jake (aparentemente não estava fazendo falta) do package.json das libs Leaflet*

Feito isso, passou do pnpm install --recursive

Após isso deu erro no pnpm run build:

 ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND  No package.json (or package.yaml, or package.json5) was found in "/var/www/html"

O erro ocorre devido ao WORKDIR na linha 10 no Dockerfile apontar para o diretório /var/www/src que não existe dentro da imagem. Editei para /var/www/html/protected

mateus-marchi commented 1 year ago

Boa tarde...

Aqui acontece exatamente o mesmo problema que você relatou, com as mesmas saídas apresentadas.

Porém, mesmo alterando os arquivos da forma que você fez, o cenário permanece o mesmo.

ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND  No package.json (or package.yaml, or package.json5) was found in "/var/www/html"

Conseguiu passar deve ponto e levantar o serviço?

Algum desenvolvedor do projeto consegue auxiliar para resolvermos essa questão?

Obrigado.

adaneps commented 1 year ago

Boa tarde...

Aqui acontece exatamente o mesmo problema que você relatou, com as mesmas saídas apresentadas.

Porém, mesmo alterando os arquivos da forma que você fez, o cenário permanece o mesmo.

ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND  No package.json (or package.yaml, or package.json5) was found in "/var/www/html"

Conseguiu passar deve ponto e levantar o serviço?

Algum desenvolvedor do projeto consegue auxiliar para resolvermos essa questão?

Obrigado.

Havia digitado errado na resposta anterior , altera a linha 10 em compose/production/Dockerfile para WORKDIR /var/www/html/protected