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

Unexpected identifier #79

Closed
IanVS opened this issue Jan 11, 2022 · 2 comments
Closed

Unexpected identifier #79

IanVS opened this issue Jan 11, 2022 · 2 comments

Comments

@IanVS
Copy link

IanVS commented Jan 11, 2022

I'm trying to clone and install dependencies in a project which appears to use corepack, and I'm having a difficult time. I've tried to follow the directions, but am getting an error. Here's what I've done.

▶ node --version
v16.13.0

▶ corepack enable

▶ corepack prepare yarn@3.0.2 --activate
Preparing yarn@3.0.2 for immediate activation...

▶ corepack yarn install
Syntax Error: Unexpected identifier
(function (exports, require, module, __filename, __dirname) { version https://git-lfs.github.com/spec/v1
                                                                      ^^^^^

SyntaxError: Unexpected identifier
    at new Script (node:vm:100:7)
    at NativeCompileCache._moduleCompile (/Users/ianvs/.nvm/versions/node/v16.13.0/lib/node_modules/corepack/dist/vcc.js:251:18)
    at Module._compile (/Users/ianvs/.nvm/versions/node/v16.13.0/lib/node_modules/corepack/dist/vcc.js:195:36)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (/Users/ianvs/.nvm/versions/node/v16.13.0/lib/node_modules/corepack/dist/vcc.js:170:20)
    at $K (/Users/ianvs/.node/corepack/yarn/3.0.2/yarn.js:242:4931)
    at ql (/Users/ianvs/.node/corepack/yarn/3.0.2/yarn.js:242:5785)

I guess this is an error coming from corepack? I'm not really sure what's going on, to be honest. Let me know if there is anything else I can do to help debug. Thanks!

@IanVS
Copy link
Author

IanVS commented Jan 11, 2022

Turns out the repo is using git lfs, which I've never worked with before. Sorry for the noise.

@IanVS IanVS closed this as completed Jan 11, 2022
@felixf4xu
Copy link

felixf4xu commented Nov 13, 2022

what are the additional steps to run yarn install for a git repo with lfs? oh, I figured it out:

sudo apt install git-lfs

and then in the working folder, run

git lfs install
git lfs pull

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