HumanSignal / label-studio

Label Studio is a multi-type data labeling and annotation tool with standardized output format
https://labelstud.io
Apache License 2.0
19.04k stars 2.37k forks source link

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

Open Cyurainya opened 1 year ago

Cyurainya commented 1 year ago

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 commented 1 year ago

Hello Cyurainya,

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

Cyurainya commented 1 year ago

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 commented 1 year ago

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

Cyurainya commented 1 year ago

🥲not yet

hamza005 commented 1 year ago

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

Cyurainya commented 1 year ago

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

yuvaal commented 1 year ago

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 commented 1 year ago

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

hamza005 commented 1 year ago

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/label-studio@1.8.0/build/static/js/main.js

elad-n commented 1 year ago

hey, I'm experiencing the same issue

node : v20.4.0 
npm -v 9.7.2
label studio 1.8
shreesha-j commented 1 year ago

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

litury commented 1 year ago

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 commented 1 year ago

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

mwalmsley commented 1 year ago

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 commented 1 year ago

The issue is being widely reported here - https://github.com/HumanSignal/label-studio-frontend/issues/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 commented 7 months ago

Anyone knows how to fix this?