FireboltCasters / directus-extension-auto-translation

MIT License
15 stars 1 forks source link

error Cannot read properties of null (reading 'matches') #6

Open tomislaveric opened 5 months ago

tomislaveric commented 5 months ago

I am trying to use the extension in my docker container like it was explained in the README, but i end up with the error. Not sure what is failing, looks like arborist has some issues.

I tried to use the lastest directus image -> same issue Locally it seems to install correctly.

This is my docker-compose.yml

directus:
    image: directus/directus:10.8.3
    command: >
        sh -c "
        npm install directus-extension-auto-translation && 
        npx directus bootstrap && echo 'Node' && 
        node node_modules/directus/dist/start.js
        "
    ports:
      - 8055:8055
    volumes:
      - ./database:/directus/database
      - ./uploads:/directus/uploads
      - ./extensions:/directus/extensions
      - ./secrets:/directus/secrets
    depends_on:
      - cache
      - database

And this is the error i copied from the container:

timing idealTree:node_modules/directus-extension-auto-translation Completed in 757ms
58 silly placeDep ROOT @types/node@20.11.29 OK for: deepl-node@1.12.0 want: >=12.0
59 timing idealTree Completed in 4928ms
60 timing command:install Completed in 4933ms
61 verbose stack TypeError: Cannot read properties of null (reading 'matches')
61 verbose stack     at Link.matches (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js:1115:41)
61 verbose stack     at Link.canDedupe (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js:1069:15)
61 verbose stack     at PlaceDep.pruneDedupable (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/place-dep.js:426:14)
61 verbose stack     at new PlaceDep (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/place-dep.js:278:14)
61 verbose stack     at #buildDepStep (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:933:18)
61 verbose stack     at async Arborist.buildIdealTree (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:196:7)
61 verbose stack     at async Promise.all (index 1)
61 verbose stack     at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:159:5)
61 verbose stack     at async Install.exec (/usr/local/lib/node_modules/npm/lib/commands/install.js:152:5)
61 verbose stack     at async module.exports (/usr/local/lib/node_modules/npm/lib/cli-entry.js:61:5)
62 verbose cwd /directus
63 verbose Linux 6.6.16-linuxkit
64 verbose node v18.19.1
65 verbose npm  v10.2.4
66 error Cannot read properties of null (reading 'matches')
67 verbose exit 1
68 timing npm Completed in 5051ms
69 verbose unfinished npm timer reify 1710836655237
70 verbose unfinished npm timer reify:loadTrees 1710836655240
71 verbose unfinished npm timer idealTree:buildDeps 1710836658092
72 verbose unfinished npm timer idealTree:node_modules/deepl-node 1710836660160
73 verbose code 1
karahanyilmazer commented 4 months ago

I have the same issue and would be very glad to have a fix

tomislaveric commented 3 months ago

FYI: No need to use this extension anymore, Directus announced an own AI Text Translator extension. You can check it out here: https://directus.io/tv/ai/ai-text-translator. Here is the GitHub Repository: https://github.com/directus-labs/extension-ai-translator-operation