Closed MJ7777777 closed 3 years ago
I thought I would attempt to build and compile from source mozjpeg to see it it helps.
These are the steps I took:
sudo apt-get update
sudo apt-get install cmake autoconf automake libtool nasm make pkg-config git
git clone https://github.com/mozilla/mozjpeg.git
cd mozjpeg
mkdir build && cd build
sudo cmake -G"Unix Makefiles" ../
sudo make install
sudo ln -s /opt/mozjpeg/bin/jpegtran /usr/bin/mozjpeg
I then did
cd jamify-starter
yarn add gatsby-rehype-inline-images
same issue.
An unexpected error occurred: "ENOENT: no such file or directory, lstat '/home/$USER/jamify-starter/node_modules/mozjpeg/\u0001�\u0017@@�\u000f\f@8\b@\u001eu0006\u0005@@@@@�\u0001�\u0001\b\u0003\u0004\u0002\u0002@\u0002@\u001c\u001c\u0001\u0001\u0005@@\u001c�'".
@MJ7777777: Welcome to this project. I am sorry if you have difficulties installing the package.
Unfortunately, I am not able to reproduce your issue and it may well have something to do with your architecture (arm64) (Raspberry Pi4), yarn or node version. mozpeg is not a direct dependency of this project - it is installed by the 'sharp' module which is part of the gatsby-rehype-inline-images
.
Something looks really broken (the path shown is not part of mozpeg and looks wrongly encoded). My advice is that you try to install on another machine first (if you can). At any case, please start completely over and document every step that you do. You can paste those steps (and the resulting) outcome here for further reference.
Sure, this is my 11 year old son's project hence trying to setup his first website on a raspberry pi 4. He preffered your look and feel to the deafult gatsby-ghost repo. I will start over when I have more time. I have spent a long time on this already and have no more available time today. I have managed to move past the above by building mozjpeg from source and then adding a symlink to but it now fails on
error An unexpected error occurred: "ENOENT: no such file or directory, lstat '/home/alejandro7777777/jamify-starter/node_modules/pngquant-bin/\u0001�'
I suspect its the arm64 architecture also as I had no issues using your template on macOS a while ago.
Maybe the yarn.lock
needs to be built on arm
. If you have not done so, you can try to re-create all modules with:
rm -rf node_modules
rm -rf yarn.lock
yarn
You can also try to use npm
instead of yarn
(after removing node_modules and yarn.lock) as it might be better supported on other platforms.
Closing this due to inactivity. This can be re-opened at any time.
Hi, I'm having difficulty following your tutorial specifically up until this point I had a few issues but I resolved them however at this point https://www.jamify.org/2020/07/15/running-a-professional-blog-for-free/#add-plugin-for-inline-images
System: Ubuntu 20.10 (arm64) (Raspberry Pi4) npm 6.14.10 node v12.20.1 yarn 1.22.10
Yarn Error Log
I tried to manually add the mozjpg
yarn add mozjpg
same issue:
I'd appreciate any recommendations on how to resolve this. Thanks