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

paraglide-js: not found #205

Closed
Maker-Boot opened this issue Apr 5, 2024 · 16 comments
Closed

paraglide-js: not found #205

Maker-Boot opened this issue Apr 5, 2024 · 16 comments
Assignees
Labels
bug Something isn't working deployment This issue deals with deployment

Comments

@Maker-Boot
Copy link

Hello,

npm CI is failing

To Reproduce
docker compose up
Expected behavior
Application should run without error

Environment (please complete the following information):

Device: Ubuntu server
OS: 12.02
Docker version 25.0.1, build 29cf629

Output :
=> ERROR [frontend builder 13/15] RUN npm ci 36.4s

[frontend builder 13/15] RUN npm ci:
4.022 npm WARN ERESOLVE overriding peer dependency
4.023 npm WARN While resolving: @sveltejs/vite-plugin-svelte@2.5.3
4.023 npm WARN Found: vite@5.1.6
4.023 npm WARN node_modules/vite
4.024 npm WARN dev vite@"^5.0.0" from the root project
4.024 npm WARN 10 more (@storybook/builder-vite, @storybook/svelte-vite, ...)
4.024 npm WARN
4.024 npm WARN Could not resolve dependency:
4.024 npm WARN peer vite@"^4.0.0" from @sveltejs/vite-plugin-svelte@2.5.3
4.024 npm WARN node_modules/@storybook/svelte-vite/node_modules/@sveltejs/vite-plugin-svelte
4.024 npm WARN @sveltejs/vite-plugin-svelte@"^2.4.2" from @storybook/svelte-vite@7.6.17
4.024 npm WARN node_modules/@storybook/svelte-vite
4.024 npm WARN 1 more (@sveltejs/vite-plugin-svelte-inspector)
4.024 npm WARN
4.024 npm WARN Conflicting peer dependency: vite@4.5.3
4.024 npm WARN node_modules/vite
4.024 npm WARN peer vite@"^4.0.0" from @sveltejs/vite-plugin-svelte@2.5.3
4.024 npm WARN node_modules/@storybook/svelte-vite/node_modules/@sveltejs/vite-plugin-svelte
4.024 npm WARN @sveltejs/vite-plugin-svelte@"^2.4.2" from @storybook/svelte-vite@7.6.17
4.024 npm WARN node_modules/@storybook/svelte-vite
4.024 npm WARN 1 more (@sveltejs/vite-plugin-svelte-inspector)
4.037 npm WARN ERESOLVE overriding peer dependency
4.038 npm WARN While resolving: @sveltejs/vite-plugin-svelte-inspector@1.0.4
4.038 npm WARN Found: vite@5.1.6
4.038 npm WARN node_modules/vite
4.038 npm WARN dev vite@"^5.0.0" from the root project
4.038 npm WARN 10 more (@storybook/builder-vite, @storybook/svelte-vite, ...)
4.038 npm WARN
4.038 npm WARN Could not resolve dependency:
4.038 npm WARN peer vite@"^4.0.0" from @sveltejs/vite-plugin-svelte-inspector@1.0.4
4.038 npm WARN node_modules/@storybook/svelte-vite/node_modules/@sveltejs/vite-plugin-svelte/node_modules/@sveltejs/vite-plugin-svelte-inspector
4.038 npm WARN @sveltejs/vite-plugin-svelte-inspector@"^1.0.4" from @sveltejs/vite-plugin-svelte@2.5.3
4.038 npm WARN
4.038 npm WARN Conflicting peer dependency: vite@4.5.3
4.038 npm WARN node_modules/vite
4.038 npm WARN peer vite@"^4.0.0" from @sveltejs/vite-plugin-svelte-inspector@1.0.4
4.038 npm WARN node_modules/@storybook/svelte-vite/node_modules/@sveltejs/vite-plugin-svelte/node_modules/@sveltejs/vite-plugin-svelte-inspector
4.038 npm WARN @sveltejs/vite-plugin-svelte-inspector@"^1.0.4" from @sveltejs/vite-plugin-svelte@2.5.3
17.64 npm WARN deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead
18.56 npm WARN deprecated domexception@4.0.0: Use your platform's native DOMException instead
36.13
36.13 > frontend@0.0.1 postinstall
36.13 > paraglide-js compile --project ./project.inlang
36.13
36.15 sh: paraglide-js: not found
36.16 npm ERR! code 127
36.16 npm ERR! path /app
36.16 npm ERR! command failed
36.16 npm ERR! command sh -c paraglide-js compile --project ./project.inlang
36.16
36.16 npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-04-05T10_58_05_289Z-debug-0.log


failed to solve: process "/bin/sh -c npm ci" did not complete successfully: exit code: 127

Regards.

@Mohamed-Hacene
Copy link
Collaborator

Mohamed-Hacene commented Apr 5, 2024

Hi @Maker-Boot !

Thank you for informing us of your error. I have a few questions to better understand your issue:

  • Are you up to date with the main branch ?
  • When you ran ./docker-compose.sh script, have you got any error ?
  • If you're up to date with the main branch, what do you get if you run docker compose build ?

@Mohamed-Hacene Mohamed-Hacene added bug Something isn't working deployment This issue deals with deployment labels Apr 5, 2024
@Mohamed-Hacene Mohamed-Hacene self-assigned this Apr 5, 2024
@Maker-Boot
Copy link
Author

Maker-Boot commented Apr 5, 2024

Hello @Mohamed-Hacene

I'm up to date from the main branch : Fri Apr 5 10:59:24 2024 commit 23d0fa4

Running both ./docker-compose.sh and docker compose build has the same result.
28.47 > frontend@0.0.1 postinstall
28.47 > paraglide-js compile --project ./project.inlang
28.47
28.48 sh: paraglide-js: not found
28.48 npm ERR! code 127
28.48 npm ERR! path /app
28.48 npm ERR! command failed
28.49 npm ERR! command sh -c paraglide-js compile --project ./project.inlang

Regards.

@Mohamed-Hacene
Copy link
Collaborator

Ok, it is very strange. Could you run into the frontend folder npm install @inlang/paraglide-js, and then run again docker compose build in the root folder

@Maker-Boot
Copy link
Author

Package seems to ahve been installed but the docker build has the same output

log:
~/cisco-assistant/frontend$ npm install @inlang/paraglide-js
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @sveltejs/vite-plugin-svelte@2.5.3
npm WARN Found: vite@5.1.6
npm WARN node_modules/vite
npm WARN peer vite@"^3.0.0 || ^4.0.0 || ^5.0.0" from @storybook/builder-vite@7.6.17
npm WARN node_modules/@storybook/builder-vite
npm WARN @storybook/builder-vite@"7.6.17" from @storybook/svelte-vite@7.6.17
npm WARN node_modules/@storybook/svelte-vite
npm WARN 1 more (@storybook/sveltekit)
npm WARN 10 more (@storybook/svelte-vite, @storybook/sveltekit, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer vite@"^4.0.0" from @sveltejs/vite-plugin-svelte@2.5.3
npm WARN node_modules/@storybook/svelte-vite/node_modules/@sveltejs/vite-plugin-svelte
npm WARN @sveltejs/vite-plugin-svelte@"^2.4.2" from @storybook/svelte-vite@7.6.17
npm WARN node_modules/@storybook/svelte-vite
npm WARN 1 more (@sveltejs/vite-plugin-svelte-inspector)
npm WARN
npm WARN Conflicting peer dependency: vite@4.5.3
npm WARN node_modules/vite
npm WARN peer vite@"^4.0.0" from @sveltejs/vite-plugin-svelte@2.5.3
npm WARN node_modules/@storybook/svelte-vite/node_modules/@sveltejs/vite-plugin-svelte
npm WARN @sveltejs/vite-plugin-svelte@"^2.4.2" from @storybook/svelte-vite@7.6.17
npm WARN node_modules/@storybook/svelte-vite
npm WARN 1 more (@sveltejs/vite-plugin-svelte-inspector)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @sveltejs/vite-plugin-svelte-inspector@1.0.4
npm WARN Found: vite@5.1.6
npm WARN node_modules/vite
npm WARN peer vite@"^3.0.0 || ^4.0.0 || ^5.0.0" from @storybook/builder-vite@7.6.17
npm WARN node_modules/@storybook/builder-vite
npm WARN @storybook/builder-vite@"7.6.17" from @storybook/svelte-vite@7.6.17
npm WARN node_modules/@storybook/svelte-vite
npm WARN 1 more (@storybook/sveltekit)
npm WARN 10 more (@storybook/svelte-vite, @storybook/sveltekit, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer vite@"^4.0.0" from @sveltejs/vite-plugin-svelte-inspector@1.0.4
npm WARN node_modules/@storybook/svelte-vite/node_modules/@sveltejs/vite-plugin-svelte/node_modules/@sveltejs/vite-plugin-svelte-inspector
npm WARN @sveltejs/vite-plugin-svelte-inspector@"^1.0.4" from @sveltejs/vite-plugin-svelte@2.5.3
npm WARN
npm WARN Conflicting peer dependency: vite@4.5.3
npm WARN node_modules/vite
npm WARN peer vite@"^4.0.0" from @sveltejs/vite-plugin-svelte-inspector@1.0.4
npm WARN node_modules/@storybook/svelte-vite/node_modules/@sveltejs/vite-plugin-svelte/node_modules/@sveltejs/vite-plugin-svelte-inspector
npm WARN @sveltejs/vite-plugin-svelte-inspector@"^1.0.4" from @sveltejs/vite-plugin-svelte@2.5.3
npm WARN deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead
npm WARN deprecated domexception@4.0.0: Use your platform's native DOMException instead

added 1369 packages, and audited 1370 packages in 27s

250 packages are looking for funding
run npm fund for details

2 moderate severity vulnerabilities

To address all issues, run:
npm audit fix

Run npm audit for details.
npm notice
npm notice New minor version of npm available! 10.2.3 -> 10.5.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.5.1
npm notice Run npm install -g npm@10.5.1 to update!
npm notice

=> ERROR [frontend builder 13/15] RUN npm ci 33.8s

[frontend builder 13/15] RUN npm ci:
4.007 npm WARN ERESOLVE overriding peer dependency
4.008 npm WARN While resolving: @sveltejs/vite-plugin-svelte@2.5.3
4.009 npm WARN Found: vite@5.1.6
4.009 npm WARN node_modules/vite
4.009 npm WARN dev vite@"^5.0.0" from the root project
4.009 npm WARN 10 more (@storybook/builder-vite, @storybook/svelte-vite, ...)
4.009 npm WARN
4.009 npm WARN Could not resolve dependency:
4.009 npm WARN peer vite@"^4.0.0" from @sveltejs/vite-plugin-svelte@2.5.3
4.010 npm WARN node_modules/@storybook/svelte-vite/node_modules/@sveltejs/vite-plugin-svelte
4.010 npm WARN @sveltejs/vite-plugin-svelte@"^2.4.2" from @storybook/svelte-vite@7.6.17
4.010 npm WARN node_modules/@storybook/svelte-vite
4.010 npm WARN 1 more (@sveltejs/vite-plugin-svelte-inspector)
4.010 npm WARN
4.010 npm WARN Conflicting peer dependency: vite@4.5.3
4.010 npm WARN node_modules/vite
4.010 npm WARN peer vite@"^4.0.0" from @sveltejs/vite-plugin-svelte@2.5.3
4.010 npm WARN node_modules/@storybook/svelte-vite/node_modules/@sveltejs/vite-plugin-svelte
4.011 npm WARN @sveltejs/vite-plugin-svelte@"^2.4.2" from @storybook/svelte-vite@7.6.17
4.011 npm WARN node_modules/@storybook/svelte-vite
4.011 npm WARN 1 more (@sveltejs/vite-plugin-svelte-inspector)
4.027 npm WARN ERESOLVE overriding peer dependency
4.028 npm WARN While resolving: @sveltejs/vite-plugin-svelte-inspector@1.0.4
4.029 npm WARN Found: vite@5.1.6
4.031 npm WARN node_modules/vite
4.031 npm WARN dev vite@"^5.0.0" from the root project
4.032 npm WARN 10 more (@storybook/builder-vite, @storybook/svelte-vite, ...)
4.032 npm WARN
4.033 npm WARN Could not resolve dependency:
4.033 npm WARN peer vite@"^4.0.0" from @sveltejs/vite-plugin-svelte-inspector@1.0.4
4.033 npm WARN node_modules/@storybook/svelte-vite/node_modules/@sveltejs/vite-plugin-svelte/node_modules/@sveltejs/vite-plugin-svelte-inspector
4.033 npm WARN @sveltejs/vite-plugin-svelte-inspector@"^1.0.4" from @sveltejs/vite-plugin-svelte@2.5.3
4.033 npm WARN
4.033 npm WARN Conflicting peer dependency: vite@4.5.3
4.033 npm WARN node_modules/vite
4.034 npm WARN peer vite@"^4.0.0" from @sveltejs/vite-plugin-svelte-inspector@1.0.4
4.034 npm WARN node_modules/@storybook/svelte-vite/node_modules/@sveltejs/vite-plugin-svelte/node_modules/@sveltejs/vite-plugin-svelte-inspector
4.034 npm WARN @sveltejs/vite-plugin-svelte-inspector@"^1.0.4" from @sveltejs/vite-plugin-svelte@2.5.3
18.75 npm WARN deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead
19.99 npm WARN deprecated domexception@4.0.0: Use your platform's native DOMException instead
30.01
30.01 > frontend@0.0.1 postinstall
30.01 > paraglide-js compile --project ./project.inlang
30.01
30.02 sh: paraglide-js: not found
30.02 npm ERR! code 127
30.02 npm ERR! path /app
30.02 npm ERR! command failed
30.02 npm ERR! command sh -c paraglide-js compile --project ./project.inlang

@Maker-Boot
Copy link
Author

Update

I tried locally to run npm ci but same result even when removing the node folder / cache etc...

@Inlang package are there and installed
node_modules/@inlang/
detect-json-formatting/ message-lint-rule/ paraglide-js-adapter-vite/ sdk/
json-types/ module/ plugin/ translatable/
language-tag/ paraglide-js/ project-settings/
message/ paraglide-js-adapter-unplugin/ result/

npm --version 10.5.0
node --version v21.7.2

@Mohamed-Hacene
Copy link
Collaborator

Ok, we need to investigate this problem a little further, but in the meantime I suggest you to request a free cloud trial to be able to test the solution anyway.

I will do the installation on a blank machine to be sure it comes from a dependency/package issue and not from our dockerfile. I let this issue opened to keep you informed.

@Maker-Boot
Copy link
Author

@Mohamed-Hacene

Ok thanks. i've requested the trial few minutes again indeed.

Have a nice day.

@Maker-Boot
Copy link
Author

@Mohamed-Hacene

I've re done the installation from scratch.

It goes a bit further now.
Only difference is the version
node --version v21.2.0
npm --version 10.5.1

(also i'm bahinf a proxy but all access has been granted to be able to download the dependencies)

No more sh not found but i have this :
25.30 > paraglide-js compile --project ./project.inlang
25.30
25.62 ℹ [paraglide] Compiling inlang project at "./project.inlang".
25.64
25.64 WARN Could not find repository root for path /app/project.inlang
25.64
70.80
70.80 WARN The project has errors:
70.80
70.81
70.81 ERROR Couldn't import the plugin "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-empty-pattern@latest/dist/index.js":
70.81
70.81 TypeError: fetch failed
70.81
70.81
70.81 TypeError: fetch failed
70.81 at resolveModules (node_modules/@inlang/paraglide-js/dist/index.js:21488:25)
70.81 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
70.81
70.81
70.81 ERROR Couldn't import the plugin "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-identical-pattern@latest/dist/index.js":
70.81
70.81 TypeError: fetch failed
70.81
70.81
70.81 TypeError: fetch failed
70.81 at resolveModules (node_modules/@inlang/paraglide-js/dist/index.js:21488:25)
70.81 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
70.81
70.81
70.81 ERROR Couldn't import the plugin "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-missing-translation@latest/dist/index.js":
70.81
70.81 TypeError: fetch failed
70.81
70.81
70.81 TypeError: fetch failed
70.81 at resolveModules (node_modules/@inlang/paraglide-js/dist/index.js:21488:25)
70.81 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
70.81
70.81
70.81 ERROR Couldn't import the plugin "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-without-source@latest/dist/index.js":
70.81
70.81 TypeError: fetch failed
70.81
70.81
70.81 TypeError: fetch failed
70.81 at resolveModules (node_modules/@inlang/paraglide-js/dist/index.js:21488:25)
70.81 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
70.81
70.81
70.81 ERROR Couldn't import the plugin "https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-valid-js-identifier@latest/dist/index.js":
70.81
70.81 TypeError: fetch failed
70.81
70.81
70.81 TypeError: fetch failed
70.81 at resolveModules (node_modules/@inlang/paraglide-js/dist/index.js:21488:25)
70.81 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
70.81
70.81
70.81 ERROR Couldn't import the plugin "https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@latest/dist/index.js":
70.81
70.81 TypeError: fetch failed
70.81
70.81
70.81 TypeError: fetch failed
70.81 at resolveModules (node_modules/@inlang/paraglide-js/dist/index.js:21488:25)
70.81 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
70.81
70.81
70.81 ERROR Couldn't import the plugin "https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@latest/dist/index.js":
70.81
70.81 TypeError: fetch failed
70.81
70.81
70.81 TypeError: fetch failed
70.81 at resolveModules (node_modules/@inlang/paraglide-js/dist/index.js:21488:25)
70.81 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
70.81
70.81
70.81 ERROR No plugin provides a loadMessages() or saveMessages() function
70.81
70.81 In case no plugin threw an error, you likely forgot to add a plugin that handles the loading and saving of messages. Refer to the marketplace for available plugins https://inlang.com/marketplace.
70.81
70.81
70.81 In case no plugin threw an error, you likely forgot to add a plugin that handles the loading and saving of messages. Refer to the marketplace for available plugins https://inlang.com/marketplace.
70.81 at resolvePlugins (node_modules/@inlang/paraglide-js/dist/index.js:21454:24)
70.81 at resolveModules (node_modules/@inlang/paraglide-js/dist/index.js:21529:33)
70.81 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
70.81
70.83 npm ERR! code 1
70.83 npm ERR! path /app
70.83 npm ERR! command failed
70.83 npm ERR! command sh -c paraglide-js compile --project ./project.inlang

@Mohamed-Hacene
Copy link
Collaborator

Ok good to know, can you try without the proxy to be sure it's not related to it (If you don't have time, don't worry I will try later) ?

@Mohamed-Hacene
Copy link
Collaborator

@Maker-Boot could you also run lsb_release -a to be sure of your ubuntu version, because I'm not sure of what OS: 12.02 represents

@Maker-Boot
Copy link
Author

@Mohamed-Hacene
Sorry for the confusion it's an Ubuntu 22.04 jammy

@Mohamed-Hacene
Copy link
Collaborator

Mohamed-Hacene commented Apr 9, 2024

No problem :)
I'm discussing a similar issue in parallel #227 and the problem seems to come from the proxy despite having granted full access, as this is the only point in common between your configurations.

A workaround will be proposed as soon as possible by publishing our images.

Thanks for your help and patience.

@Maker-Boot
Copy link
Author

@Mohamed-Hacene
Thx for the update.

I cannot disable the proxy unfortunately.

@Mohamed-Hacene
Copy link
Collaborator

No problem, if we find a workaround, I will share it for everybody.
But once our images will be published, this kind of problem will no longer be a problem :)

I'll let you know here when they're up !

@Mohamed-Hacene
Copy link
Collaborator

Docker compose with prebuilt image is now available to avoid local docker images build issues.

I'm closing this issue as it should be fixed by prebuilt images.

@Maker-Boot
Copy link
Author

@Mohamed-Hacene

Thx for the work.
It's all fixed With the docker image now.

Have a nice day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working deployment This issue deals with deployment
Projects
None yet
Development

No branches or pull requests

2 participants