Closed Sn0wAlice closed 1 year ago
No idea. Does it work fine if it's runned out of a docker container? What error do you got?
Yep fine if no docker.
Do error, just deno exit randomly just after the start of the script
After search, it's seem like the module install is not correct on docker... I will investigate on this part tomorow
Add this to the docker file seems to solve the problem
# update
apt-get update
# install curl
apt-get install curl, git
# get install script and pass it to execute:
curl -sL https://deb.nodesource.com/setup_4.x | bash
# and install node
apt-get install nodejs
# confirm that it was successful
node -v
# npm installs automatically
npm -v
git clone https://github.com/lumeland/imagemagick-deno
# Clean old files
rm -rf deno
rm -rf magick-wasm
rm -rf package
rm magick-wasm.tgz
rm test/unsplash-blur.jpg
# Clone the repo
git clone --depth 1 --branch 0.0.17 https://github.com/dlemstra/magick-wasm.git
# Download the wasm file
npm install @dlemstra/magick-native
# Run the script
deno run --unstable --allow-write --allow-read to_deno.js
# Copy the wasm code
cp node_modules/@dlemstra/magick-native/magick.js deno/src/wasm/magick_native.js
echo "\nexport default MagickNative;" >> deno/src/wasm/magick_native.js
# Autoformat the code
deno fmt deno --ignore=deno/src/wasm/magick_native.js
Oh, are you importing the package by cloning the git repo?
That code is just to generate the different versions.
You only need to import the code from https://deno.land/x/imagemagick_deno/mod.ts
.
i have no chose, by importing from deno, this may crash my container. IDK why...
fun fact: in a docker container under 240mbram | 140mVCPU, the docker will crash :)
Hello
This may be a stupid question, but, i have a project that use this module, and when i push it to a Docker container based on latest deno image, deno fail. And i don't know why.
If you have any idea how to help…. I am interested.
Have a great day