-
Notifications
You must be signed in to change notification settings - Fork 179
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
Error: Cannot find module '@css-inline/css-inline-linux-arm64-musl when starting application #1209
Comments
Having the same issue, is there any solution or workaround which does not require to downgrade? [EDIT] A temporary fix is to "manually" install the missing dependency during the deployment. |
Have similar issue but with |
Try to just |
That didn't work unfortunately. Also tried manually installing the missing dependency and got
|
Hello @jaqarrick, I think I figured out the issue. Go to the files directory inside your docker and confirm if the files were mounted. Example of files that is not mounted is below otherwise you will see mount: If it is mounted, then you will need to remove volumes from your app service in the docker-compose.yml file. Sample of my file is below:
Also, include the below in your .dockerignore After that, run the below commands and your docker will work properly:
|
@jaqarrick just add this to your package.json "optionalDependencies": {
"@css-inline/css-inline-linux-arm64-musl": "0.14.1"
} |
Encountering the same issue. Reverting to 1.10.3 works but not a long-term solution due to security issues in older versions. If someone could help in providing a solution that would be great! I'm happy to assist where needed. @jaqarrick How did you end up handling the issue? |
Not idea, but I ended up forking the package and adding the module directly in my repo. This allowed me to manually upgrade and manage the dependencies. @Matisds |
I just install it as one of the steps in my Dockerfile
|
I have the same problem, in my container, based on alpine, I have to install the musl version and on my local debian version, I have to install the gnu version. It's not very practical. To solve this problem, I added a postinstall target to the scripts in my package.json file: "postinstall": "ts-node postinstall.ts" with the postinstall.ts file: import { execSync } from 'child_process';
import { familySync } from 'detect-libc';
import os from 'os';
const platform = os.platform();
const libc = familySync();
if (platform === 'linux' && libc === 'musl') {
// Install the musl build of css-inline (used in Alpine Linux)
execSync('npm install @css-inline/[email protected]');
} else if (platform === 'linux' && libc === 'glibc') {
// Install the glibc build of css-inline (used in most other Linux distributions)
execSync('npm install @css-inline/[email protected]');
} else {
console.error('Unsupported platform');
process.exit(1);
} Is there a simpler solution @Stranger6667? Is it a correct solution? |
I think it should be automatically detected on the css-inline side without extra steps on your side |
You're absolutely right; I've just found the cause of the problem on my side: Taking a closer look at my project, I noticed that there was an .npmrc file that disabled the installation of optional packages ( Since @css-inline uses optional dependencies to install its native platform-specific dependencies, it's not surprising that it doesn't work for me. 😅 Sorry for the noise, I hope this helps others with the same configuration as me. |
I think it could be a great addition to the css-inline readme! :) Thanks for sharing the details |
Describe the bug
When I am starting my nest app I see the following error:
This occurred after upgrading to
2.0.2
of@nestjs-modules/mailer
I am using
v18.19.0
of nodeThere are a couple closed versions of this issue or a similar one (#1128 and #1146) but the solution listed there is to downgrade the package or the node version.
Older versions of the mailer package have critical security vulnerabilities by requiring
vm2
for example. So a better solution is needed.The text was updated successfully, but these errors were encountered: