Skip to content
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

Errors during installation #3

Open
T-Mike opened this issue Aug 7, 2024 · 0 comments
Open

Errors during installation #3

T-Mike opened this issue Aug 7, 2024 · 0 comments

Comments

@T-Mike
Copy link

T-Mike commented Aug 7, 2024

I have errors upon installation.
Tried both installing from marketplace and installing by git cloning, the same happens.
And also tried with directus 10.13.1 and directus 11.0.0.

ReferenceError: __filename is not defined in ES module scope
This file is being treated as an ES module because it has a '.js' file extension and '/directus/extensions/.registry/7be6c346-03c8-4bf9-9faf-e44c03ebf862/package.json' contains \"type\": \"module\". 
To treat it as a CommonJS script, rename it to use the '.cjs' file extension.

Removing "type": "module" in package.json does the trick.

Then I struggled to find the right place for the config file. I tried a lot of directories for this file, CosmiConfig does not seem to find anything anywhere. Then I tried a lot of combinations for EXTENSION_SEARCHSYNC_CONFIG_PATH... and... at some point I figured the path was relative to the inside of the directus container and used a shared folder (the one you put in the volume inside the docker-compose.yml).
Maybe would be useful to add more detail and/or an example in the README ?

And then another error:

WARN: Could not dynamically require "/directus/extensions/directus-extension-searchsync-2/.searchsyncrc.js".
Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.

My two cents it has something to do with "type": "module" removed but maybe you know how to resolve it?

For now, I ended up defining it directly in /src/config.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant