zpnk / deploy.now

One click deploys to △ now
https://deploy.now.sh/
122 stars 17 forks source link

Deploy fails when package.json does not contain a name field. #17

Open Haroenv opened 7 years ago

Haroenv commented 7 years ago

I can't get it to work with any of the examples of algolia/react-instantsearch, I'm getting the error message "Deploy failed, please check the repo and try again."

Would love to add the buttons to our READMEs 😄

zpnk commented 7 years ago

Hey @Haroenv 👋 are you still running into this issue? If so could you post the full repo url you are trying to use? Thanks!

Haroenv commented 7 years ago

Didn't try since. I'll try again tomorrow, but it's packages/examples/ any of those in there of Algolia/react-instantsearch

Haroenv commented 7 years ago

https://github.com/algolia/react-instantsearch/tree/master/packages/react-instantsearch/examples/autocomplete gives me “deploy failed, please try again” repeatedly.

zpnk commented 7 years ago

@Haroenv Okay, so I did a bunch of digging into this issue and found a couple interesting things..

The short-term solution is to add a name here. I realize that this is unnecessary and a less-than-ideal solution, but it will allow you to deploy the examples.

The long-term and better solution would be for us to move away from download-package-tarball and write our own lib to handle that functionality. Now that I've examined the code for DPT, I don't like how it assumes a package.json and tries to parse the npm scope from it. We don't need either of these things, so our lib can be less complex. (side-node - deploying repos with package.json names like @name/some-thing is currently broken. I think it's related to how DPT tries to parse things, but again, that's completely unnecessary.)

Sorry you ran into this issue, but thanks for reporting it! I'm glad we were able to surface an underlying issue here. I will be making a new follow-up issue to log the removal of download-package-tarball.

For now, can you try making the above name change and redeploying?

Haroenv commented 7 years ago

Sounds very thorough, I'll try that change