JamieMason / ImageOptim-CLI

Make optimisation of images part of your automated build process
https://foldleft.io/image-tools
MIT License
3.45k stars 125 forks source link

Installation fails if repository url is specified for package.json #164

Closed azusa-tomita closed 6 years ago

azusa-tomita commented 6 years ago

Types of Changes

What types of changes does your issue require? Put an x in all the boxes that apply:

Description

npm install does not complete when specifying the repository directly with package.json.

"imageoptim-cli": "git+ssh://github.com/JamieMason/ImageOptim-CLI.git#2.0.2",

> imageoptim-cli@2.0.0 prepack /Users/USERNAME/.npm/_cacache/tmp/git-clone-06bbdb7e
> npm run build

> imageoptim-cli@2.0.0 prebuild /Users/USERNAME/.npm/_cacache/tmp/git-clone-06bbdb7e
> rimraf dist ./test/dist

sh: rimraf: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! imageoptim-cli@2.0.0 prebuild: `rimraf dist ./test/dist`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the imageoptim-cli@2.0.0 prebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/USERNAME/.npm/_logs/2018-05-31T08_56_52_630Z-debug.log
npm ERR! code ENOPACKAGEJSON
npm ERR! package.json Non-registry package missing package.json: imageoptim-cli@git+ssh://git@github.com/JamieMason/ImageOptim-CLI.git#2.0.0.
npm ERR! package.json npm can't find a package.json file in your current directory.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/USERNAME/.npm/_logs/2018-05-31T08_56_52_842Z-debug.log

I want to fork and make corrections and personal changes in my own repository and then check from there.

Related Issue

Suggested Solution

It seems that problems are occurring with prebuild. I did not know anything more

JamieMason commented 6 years ago

Hi @azusa-tomita, I've been away on holiday.

If you are looking to fork and develop, please see: https://github.com/JamieMason/ImageOptim-CLI/blob/master/CONTRIBUTING.md which aims to help get you set up with building an installable distributable from your local code changes. I appreciate this probably sounds confusing but the route you were trying was not quite the right way, you would git clone a project to develop on it rather than npm install it from git.

Please let me know if I can help you some more.

JamieMason commented 6 years ago

Closing as it's been a couple of days but please go ahead and reopen this if you need anything more 👍