Mauricio Ulises Martinez Velez
PreguntaAlguien sabe como puedo solucionar esto? cuando trato de ejecutar el script me da error.
mumv1@DESKTOP-CRLS8B7 MINGW64 ~/documents/platzi/dom (master) $ npx create-snowpack-app workshop-1-fetch --template snowpack-template-tailwind npx: installed 24 in 4.918s - Using template snowpack-template-tailwind - Creating a new project in C:\Users\mumv1\documents\platzi\dom\workshop-1-fetch - Installing package dependencies. This might take a couple of minutes. > esbuild@0.9.7 postinstall C:\Users\mumv1\documents\platzi\dom\workshop-1-fetch\node_modules\esbuild > node install.js > undefined prepare C:\Users\mumv1\documents\platzi\dom\workshop-1-fetch > husky install C:\Users\mumv1\Documents\PLATZI\dom\workshop-1-fetch\node_modules\husky\lib\commands\install.js:22 throw new Error(`.git can't be found (see ${customDirHelp})`); ^ Error: .git can't be found (see https://typicode.github.io/husky/#/?id=custom-directory) at Object.install (C:\Users\mumv1\Documents\PLATZI\dom\workshop-1-fetch\node_modules\husky\lib\commands\install.js:22:15) at Object.<anonymous> (C:\Users\mumv1\Documents\PLATZI\dom\workshop-1-fetch\node_modules\husky\lib\bin.js:56:19) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) at internal/main/run_main_module.js:17:47 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! undefined prepare: `husky install` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the undefined prepare 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: npm ERR! C:\Users\mumv1\AppData\Roaming\npm-cache\_logs\2021-03-31T23_07_44_760Z-debug.log (node:11412) UnhandledPromiseRejectionWarning: Error: Command failed with exit code 1: npm install --loglevel error at makeError (C:\Users\mumv1\AppData\Roaming\npm-cache\_npx\11412\node_modules\create-snowpack-app\node_modules\execa\lib\error.js:59:11) at handlePromise (C:\Users\mumv1\AppData\Roaming\npm-cache\_npx\11412\node_modules\create-snowpack-app\node_modules\execa\index.js:114:26) at processTicksAndRejections (internal/process/task_queues.js:93:5) at async C:\Users\mumv1\AppData\Roaming\npm-cache\_npx\11412\node_modules\create-snowpack-app\createSnowpackApp.js:221:5 (Use `node --trace-warnings ...` to show where the warning was created) (node:11412) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promis e which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_u nhandled_rejections_mode). (rejection id: 1) (node:11412) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zer o exit code.

Miguel Angel Choque Pacompia
ufff los comentarios me salvarion

Jonathan 🦑 Alvarez
Muchas gracias Mauricio por reportar esto,
Husky al parecer no va muy bien con la instalación de plantillas de Snowpack y por eso decidí deshabilitarlo en las nuevas versiones de snowpack-template-tailwind.
Si lo intentas nuevamente no debería haber problema.
Y ahora para instalar Husky se debe hacer manualmente con:
npm run install:husky
En el repositorio detallé esto en los nuevos pasos de instalación.
Más sobre Husky: Husky es una dependencia que se usa para ejecutar comandos cuando hay un git-commit.
Saludo ✌️
Mauricio Ulises Martinez Velez
@Andreanzoe, Ya solucioné el problema y pude terminar el curso muchas gracias. Hice básicamente lo mismo que tu, instalar cada uno por separado y al final funcionó.

David Antonio Garcia Saaib
no se porque pero no me instalo husky, bueno de igual modo se me creo la carpeta del proyecto, solo ingrese a ella, instale husky con
npm i husky
npm start

Alexis Toro Navarro
😔, tal vez en el curso de Curso de Gestión de Dependencias y Paquetes con NPM puedas encontrar el problema
Mauricio Ulises Martinez Velez
@alexistoro Gracias pero eso he estado haciendo y no funciona.

Alexis Toro Navarro
Creo que esto puede ayudar
npx create-snowpack-app app-name --template snowpack-template-tailwind```