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

npm ERR! command sh -c -- sh scripts/postinstall.sh #4344

Open
Cyurainya opened this issue Jun 8, 2023 · 16 comments
Open

npm ERR! command sh -c -- sh scripts/postinstall.sh #4344

Cyurainya opened this issue Jun 8, 2023 · 16 comments
Assignees
Labels
editor Label Studio Frontend problem bug or something isn't working

Comments

@Cyurainya
Copy link

Cyurainya commented Jun 8, 2023

when I enter the command
npm install @heartexlabs/label-studio

the terminal came out the error:

npm WARN ERESOLVE overriding peer dependency
npm ERR! code 127
npm ERR! path /Users/yanniscyu/Documents/test/my-app/node_modules/@heartexlabs/label-studio
npm ERR! command failed
npm ERR! command sh -c -- sh scripts/postinstall.sh
npm ERR! sh: scripts/postinstall.sh: No such file or directory

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/yanniscyu/.npm/_logs/2023-06-08T05_31_34_898Z-debug-0.log

my node version is v16.18.1

@AbubakarSaad
Copy link
Collaborator

Hello Cyurainya,

Is this for the front-end repo that your are trying to build LSF?

@AbubakarSaad AbubakarSaad added problem bug or something isn't working editor Label Studio Frontend labels Jun 16, 2023
@Cyurainya
Copy link
Author

Cyurainya commented Jun 16, 2023

thx for your answer.
I am not trying to build LSF. I just wanted to use this package.
Here is the sequence of my operaions:

  1. create a react program by
    npm create vite@latest
  2. choose React and Typescripts
  3. Wait for the project to start successfully.
  4. Install the label-studio package
    npm install @heartexlabs/label-studio
    then the error occured~
npm WARN ERESOLVE overriding peer dependency
npm ERR! code 127
npm ERR! path /Users/yanniscyu/Documents/test/my-app/node_modules/@heartexlabs/label-studio
npm ERR! command failed
npm ERR! command sh -c -- sh scripts/postinstall.sh
npm ERR! sh: scripts/postinstall.sh: No such file or directory

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/yanniscyu/.npm/_logs/2023-06-08T05_31_34_898Z-debug-0.log

@hamza005
Copy link

@Cyurainya were you able to resolve this issue? I'm facing the same issue while installing in nuxt3 using yarn.

@Cyurainya
Copy link
Author

🥲not yet

@hamza005
Copy link

@Cyurainya what are your observations so far? any idea about the origin of this issue?

@Cyurainya
Copy link
Author

I didn't have time to fix. Finally decided to revamp his frontend project

@yuvaal
Copy link

yuvaal commented Jun 22, 2023

having the same issue on MacOS 22.5.0. Also trying to install labelstudio using npm. Just initialized the project using npm init so this is the first dependency I am trying to install. Attached the complete log.
test.txt

@AbubakarSaad
Copy link
Collaborator

AbubakarSaad commented Jun 24, 2023

Is it possible you can try npm install @heartexlabs/label-studio@latest?

@hamza005
Copy link

hamza005 commented Jun 26, 2023

Is it possible you can try npm install @heartexlabs/label-studio@latest?

Yes. I'm trying to install LSF. I've tried with npm and yarn as well. no luck. Also I tried to use it as external script file but seems like library doesn't exist on mentioned link.
Here is the link I'm using from docs.
https://unpkg.com/@heartexlabs/[email protected]/build/static/js/main.js

@elad-n
Copy link

elad-n commented Aug 7, 2023

hey, I'm experiencing the same issue

node : v20.4.0 
npm -v 9.7.2
label studio 1.8

@shreesha-j
Copy link

any update on this guys , i used linux its working but in windows its not soo,same issue

@litury
Copy link

litury commented Aug 25, 2023

Check your package.json and package-lock.json.
I had differences in in some of the paths in these files.

After making the correction, the error disappeared.
I just deleted them and created them again))

@Cyurainya
Copy link
Author

Cyurainya commented Aug 25, 2023

I have tried to remove the prepare on package.json, it worked for me now

@mwalmsley
Copy link

mwalmsley commented Oct 30, 2023

Hi folks. I have the same issue. Here's my minimal failing example:

mkdir temp
cd temp
npm init --yes
npm install @heartexlabs/label-studio  # same error with @latest

gives

npm ERR! code 2
npm ERR! path .../temp/node_modules/@heartexlabs/label-studio
npm ERR! command failed
npm ERR! command sh -c sh scripts/postinstall.sh
npm ERR! sh: 0: cannot open scripts/postinstall.sh: No such file

I can install other packages without issue. Is there something silly I'm missing?

nvm 0.39.3
npm 10.1.0
node v20.9.0

@mwalmsley
Copy link

The issue is being widely reported here - HumanSignal/label-studio-frontend#1439

The issue is with the label-studio-frontend repo, which seems to not have the required scripts folder expected by the build command.

https://www.npmjs.com/package/@heartexlabs/label-studio/v/1.8.0

@huang-li-ping
Copy link

Anyone knows how to fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor Label Studio Frontend problem bug or something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants