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

yarn dev:setup produces "vector-admin/backend/node_modules/@prisma/engines: Command failed." #87

Closed
mjackstewart opened this issue Dec 9, 2023 · 3 comments

Comments

@mjackstewart
Copy link

Hello!

I'm attempting to setup vector-admin on an Ubuntu VM running on WSL 2.

This is the Ubuntu release information:

Distributor ID: Ubuntu

Description: Ubuntu 22.04.3 LTS

Release: 22.04

Codename: jammy

I installed the most recent version of yarn with this command:

sudo apt install yarn

This also installed nodejs.

So far I've had two problems with the very first command, yarn dev:setup:

  • The first was the error:

yarn run v1.22.19
error vector-data-management-system@0.0.2: The engine "node" is incompatible with this module. Expected version ">=18". 
Got "12.22.9"
error Commands cannot run with an incompatible environment.
i

I was able to deal with that by issuing this command:

yarn config set ignore-engines 
true

  • The installer ran, but experienced this error toward the end of the installation:

error /mnt/c/Development/Projects/Python/vectoradmin/vector-admin/backend/node_modules/@prisma/engines: Command failed.

Exit code: 1

Command: node scripts/postinstall.js

Arguments:

Directory: /mnt/c/Development/Projects/Python/vectoradmin/vector-admin/backend/node_modules/@prisma/engines

Output:

/mnt/c/Development/Projects/Python/vectoradmin/vector-admin/backend/node_modules/@prisma/engines/dist/scripts/postinstal
l.js:22549

 return this[INTERNAL2].defaultPort ?? (this.protocol === "https:" ? 443 : 80);


SyntaxError: Unexpected token '?'

 at wrapSafe (internal/modules/cjs/loader.js:915:16)

 at Module._compile (internal/modules/cjs/loader.js:963:27)

at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)

 at Module.load (internal/modules/cjs/loader.js:863:32)

at Function.Module._load (internal/modules/cjs/loader.js:708:14)

 at Module.require (internal/modules/cjs/loader.js:887:19)

 at require (internal/modules/cjs/helpers.js:74:18)

 at Object. (/mnt/c/Development/Projects/Python/vectoradmin/vector-admin/backend/node_modules/@prisma/engi

Any ideas?



Most cordially,
Jack Stewart

@timothycarambat
Copy link
Member

Hey Jack,

Definitely don't ignore engine as the some libraries (and code!) rely on the node 18+ APIs that wont be present in previous versions.

install at least Node 18.0.0 but I recommend 18.13.0. On Ubuntu Jammy you can install node+yarn using the following series of commands:

  mkdir -p /etc/apt/keyrings && \
    curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
    echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
    apt-get update && \
    apt-get install -yq --no-install-recommends nodejs && \
    curl -LO https://github.com/yarnpkg/yarn/releases/download/v1.22.19/yarn_1.22.19_all.deb \
        && dpkg -i yarn_1.22.19_all.deb \
        && rm yarn_1.22.19_all.deb

Once those are installed cd into the project and run yarn dev:setup again and it will install dependencies and copy ENV files to where they need to be for minimal setup!

@mjackstewart
Copy link
Author

mjackstewart commented Dec 11, 2023 via email

@timothycarambat
Copy link
Member

It was just an operator error this time :)

The issue was just using an old version of node that is incompatible with the code for this project!

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

2 participants