Error: Cannot find module '/opt/Ferdi/resources/app.asar/node_modules/@meetfranz/theme/lib/index.js'

Hello to everyone.

I’m collaborating with the programmers involved in the ferdi project.

Ferdi motto is :"All your messaging services in one place ". Infact it is like franz and it works on a lot of oses,such as mac os M1,windows,ubuntu x64 bit. And we are trying to make it work also on the arm64 / jetson nano / Tegra. Unfortunately on this os it does not work correctly because we have a javascript error that we aren’t able to fix. This is how to reproduce it :

[ `root@zi-desktop` ](mailto:root@zi-desktop) `:~/Desktop/zi/Work/I9/Virt/dockers/arm64/ferdi2# ferdi`

`[21980:0709/185715.104381:FATAL:electron_main_delegate.cc(252)] Running as root without --no-sandbox is not supported. See` [ `https://crbug.com/638180` ](https://crbug.com/638180) `.Trace/breakpoint trap`

[ `root@zi-desktop` ](mailto:root@zi-desktop) `:~/Desktop/zi/Work/I9/Virt/dockers/arm64/ferdi2# ferdi --no-sandbox`

`A JavaScript error occurred in the main processUncaught Exception:Error: Cannot find module` [ `'/opt/Ferdi/resources/app.asar/node_modules/@meetfranz` ](mailto:'/opt/Ferdi/resources/app.asar/node_modules/@meetfranz) `/theme/lib/index.js'.
 Please verify that the package.json has a valid "main" entryat 
tryPackage (internal/modules/cjs/loader.js:310:19)at 
Function.Module._findPath (internal/modules/cjs/loader.js:523:18)at 
Module._resolveFilename (internal/modules/cjs/loader.js:874:27)at 
Function.n._resolveFilename (electron/js2c/browser_init.js:257:1128)at 
Module._load (internal/modules/cjs/loader.js:732:27)at Function.f._load 
(electron/js2c/asar_bundle.js:5:12913)`

(running as normal user gives the same error)

Basically we use a docker container like this to produce the deb packages that we will install on the os . Below u can see the Dockerfile for arm64 / tegra / jetson nano :

`FROM node:fermium-buster`

`LABEL Author="ZioMario <` [ `marietto2008@gmail.com` ](mailto:marietto2008@gmail.com) `>"`

`LABEL Title="arm64/ferdi"`

`# Enviorment variables`

`#ARG username=ferdi-arm64-builder`

`#ENV HOME /home/$username`

`ENV DEBIAN_FRONTEND=noninteractive`

`ENV LC_ALL=C.UTF-8`

`ENV LANG=C.UTF-8`

`ENV PATH="/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/usr/local/lib:/usr/include:/usr/share"`

`#ENV HW="GPU"`

`#ENV TERM xterm`

`ENV USE_SYSTEM_FPM=true`

`ENV PREVAL_BUILD_INFO_PLACEHOLDERS=true`

`#RUN apt-get update && apt-get install -y ca-certificates curl netbase wget tzdata rpm git xz-utils nano gedit ruby gem`

`RUN apt-get update && apt install -y rpm ruby gem && gem install fpm --no-ri --no-rdoc --no-document`

`WORKDIR /ferdi`

`RUN git clone` [ `https://github.com/getferdi/ferdi.git` ](https://github.com/getferdi/ferdi.git) `. && git submodule update --init --recursive`

`RUN npx lerna bootstrap`

`RUN cd recipes && npm i && npm run package`

`RUN npm run build`

It is working everywhere,except on the jetson nano. do u have some ideas about how to fix it ? thanks.

Hi,
We don’t have experience about running the service. Doe it work on other arm platform such as Raspberry Pi? Probably the implementation is only for PC instead of embedded systems.

Note that the above error is looking for a file which Ferdi would have to install. Some of your development content is missing (and is unrelated to whether or not the Jetson is used).

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.