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

Running into issue with sync on pnpm #171

Closed
ElasticBottle opened this issue Nov 20, 2022 · 9 comments
Closed

Running into issue with sync on pnpm #171

ElasticBottle opened this issue Nov 20, 2022 · 9 comments

Comments

@ElasticBottle
Copy link

As per title, running into the following issue:

node -r dotenv-vault-core/config ./node_modules/.bin/next dev
.../node_modules/.bin/next:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
          ^^^^^^^

SyntaxError: missing ) after argument list
    at Object.compileFunction (node:vm:352:18)
    at wrapSafe (node:internal/modules/cjs/loader:1033:15)
    at Module._compile (node:internal/modules/cjs/loader:1069:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47

Running node V16.15.1, next 13.0.4

@motdotla
Copy link
Member

Hi @ElasticBottle, at first glance, it looks like that issue could be occurring in Next.js.

Have you first tried updating your next library?

@motdotla
Copy link
Member

If you remove node -r dotenv-vault-core/config and just run ./node_modules/.bin/next dev does the app run successfully?

@ElasticBottle
Copy link
Author

Yeap, it works, only when I add the part in front does it run into errors

@motdotla
Copy link
Member

What version of dotenv-vault-core are you running?

@ElasticBottle
Copy link
Author

"dotenv-vault-core": "^0.6.1",

@motdotla
Copy link
Member

I can repeat the issue. It's related to this pnpm/pnpm#4782

@motdotla
Copy link
Member

Can you try adding a .npmrc file with this value:

node-linker=hoisted

Then run pnpm install

Then try running the dev command again: pnpm run dev

That solved it for me.

@ElasticBottle
Copy link
Author

Awesome, works like a charm, thanks.

I have made a related simple PR/www#17 that adds more information for future pnpm users.

@motdotla
Copy link
Member

Thank you 💪

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