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

sh: 1: semantic-release: not found #499

Closed
st0ffern opened this issue Oct 31, 2017 · 9 comments
Closed

sh: 1: semantic-release: not found #499

st0ffern opened this issue Oct 31, 2017 · 9 comments

Comments

@st0ffern
Copy link

st0ffern commented Oct 31, 2017

> semantic-release pre && npm publish && semantic-release post
sh: 1: semantic-release: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! app@0.0.0-development semantic-release: `semantic-release pre && npm publish && semantic-release post`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the app@0.0.0-development semantic-release script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:

What am i doing wrong? semantic-release is in the package.json and i have cleared the Travis cache..
Same error..

@pvdlg
Copy link
Member

pvdlg commented Oct 31, 2017

Could you provide a link to your repo? Or at least your package.json and travis.yml ?

@st0ffern
Copy link
Author

st0ffern commented Nov 1, 2017

@gr2m
Copy link
Member

gr2m commented Nov 1, 2017

it runs yarn instead of npm install and I don’t know why ... I'm not familiar with yarn but can there be a reason that it doesn't install semantic-release from the dev dependencies?

Can you add npm ls semantic-release to before_script to see if it gets installed?

@pvdlg
Copy link
Member

pvdlg commented Nov 1, 2017

I think Travis use yarn if it finds a yarn.lock file but no package-lock.json.

But if I install with yarn install and run npm run semantic-release it works... Not how installing with yarn is causing the issue.

@st0ffern
Copy link
Author

st0ffern commented Nov 1, 2017

I think the answer may be here: yarnpkg/yarn#2739
Trying to set it into development mode on Travis..

@gr2m
Copy link
Member

gr2m commented Nov 1, 2017

I looked for NODE_ENV=production but it doesn't look like your travis build set this environment variable

@st0ffern
Copy link
Author

st0ffern commented Nov 1, 2017

removing yarn.lock and generating package-lock.json seems to fix it..
Yet there is a new error:

WARN invalid config loglevel="notice"
[Travis Deploy Once]: There is only one job for this build.
npm WARN prepublish-on-install As of npm@5, `prepublish` scripts are deprecated.
npm WARN prepublish-on-install Use `prepare` for build steps and `prepublishOnly` for upload-only.
npm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.

@pvdlg
Copy link
Member

pvdlg commented Nov 1, 2017

It's not an error, just warning from npm. You are using a prepublishscript [here](https://github.com/stoffern/universal-app/blob/master/package.json#L9) and that's a deprecated feature. You should replace it byprepareorprepublishOnly `.

See https://docs.npmjs.com/misc/scripts#prepublish-and-prepare

@st0ffern
Copy link
Author

st0ffern commented Nov 1, 2017

thanks 😉
Yet there seems to be a problem using yarn. I will close this for now but it may be reopened if more people get this error in the future..

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

3 participants