-
-
Notifications
You must be signed in to change notification settings - Fork 1
CLI doesn't work if installed via npm
#2
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
Comments
Hi @jakerdy , thanks for reporting the issue. I was able to reproduce it on my local windows machine.
For me, it didn't work in command prompt nor powershell. I'll look into it. |
More details, i try it on Linux, same result. But, it most likeley not an os issue, it's npm/pnpm. |
npm
This seems related to #1 My guess — the CLI is missing a PR to fix is welcome |
@jakerdy could you test on latest 1.3.5 please? |
Well, it's broken in other place now $ tinyhttp new basic my-app
Creating a new tinyhttp project from basic template in my-app folder ⚡
Fetching template contents ⌛
⠧ Fetching README.md fileundefined:1
# Basic example
^
SyntaxError: Unexpected token # in JSON at position 0
at JSON.parse (<anonymous>)
at parseJSONFromBytes (C:\Users\Me\AppData\Roaming\npm\node_modules\@tinyhttp\cli\node_modules\undici\lib\fetch\body.js:580:15)
at successSteps (C:\Users\Me\AppData\Roaming\npm\node_modules\@tinyhttp\cli\node_modules\undici\lib\fetch\body.js:520:23)
at C:\Users\Me\AppData\Roaming\npm\node_modules\@tinyhttp\cli\node_modules\undici\lib\fetch\util.js:821:56
at node:internal/process/task_queues:140:7
at AsyncResource.runInAsyncScope (node:async_hooks:203:9)
at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v18.17.0 |
@jakerdy shit, I'm sorry I convert the readme to JSON and that's why it breaks |
will release a patch soon |
@jakerdy could you try please on latest version? sorry for a late response |
@jakerdy sorry for the delay again - i've published a new version, it should work properly now |
Describe the bug
I am working on windows. I've tried to create new project with CLI, and it failed.
My setup:
Steps to reproduce the behavior:
Git Bash Here
from context menu in a directory with my projectsAlso, if i try to run
tinyhttp new...
from cmd of powershell, I got cli index.js opened in default editor for .js files. Is it me, or CLI shouldn't work on Windows?Expected behavior
It should work as described in tutorial. I want to get working and settuped project to avoid all that ESM hustle...
The text was updated successfully, but these errors were encountered: