VladimirIvanin / insales-uploader

Актуальная версия тут -
https://github.com/insales/insales-uploader
MIT License
9 stars 2 forks source link

If the theme has an error then the process stops without a friendly error message #9

Closed mike-lipin closed 6 years ago

mike-lipin commented 7 years ago

node 8.1.2 OS Windows 10 Creators

Steps to reproduce:

1) Dowload a woking theme

2) Make any mistake which prevents server from apllying the theme like {%commen%} {%if ... %} {%end comment%} in liquid or comment some fields inside setup.json

3) Try upload or push

4) After a while see this (node:7904) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: options.message.replace is not a fu (node:7904) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handl minate the Node.js process with a non-zero exit code.

So there is no way to spot a mistake in the theme from here.

I had to go to insales dashboard and try to create a new theme by uploading the theme archive. This way i got the friendly errors and figured out why my theme had failed.

VladimirIvanin commented 6 years ago

Доброго времени суток!

Пока не нашел чем проверять liquid файлы на ошибки.

Всё, что есть на node.js не пропускает тег include. Точнее парсер пытается искать сниппеты.

Со временем придумаю как решить проблему.

VladimirIvanin commented 6 years ago

Исправлено в новой версии https://github.com/insales/insales-uploader

https://github.com/insales/insales-uploader/commit/5f0b3e382d93045567dbf086fc4d3e85fb84d845