Skip to content
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

Installation fails #224

Closed
IAfanasov opened this issue Oct 27, 2020 · 11 comments
Closed

Installation fails #224

IAfanasov opened this issue Oct 27, 2020 · 11 comments

Comments

@IAfanasov
Copy link

Issue description

I can not install the last published version. I run npm i -D ts-node-dev and here is the output:

npm WARN ts-node-dev@1.0.0 requires a peer of node-notifier@* but none is installed. You must install peer dependencies yourself.
npm WARN ts-node-dev@1.0.0 requires a peer of typescript@* but none is installed. You must install peer dependencies yourself.
npm WARN ts-node@9.0.0 requires a peer of typescript@>=2.7 but none is installed. You must install peer dependencies yourself.
npm WARN temp@1.0.0 No description
npm WARN temp@1.0.0 No repository field.

npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path <hidden>/node_modules/ts-node-dev/lib\bin.js
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '<hidden>/node_modules/ts-node-dev/lib\bin.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!    <hidden>/.npm/_logs/2020-10-27T07_49_11_142Z-debug.log

Context

OS version (is it docker or host?), ts-node-dev version
Host, macOS Catalina, 10.15.7

Did you try to run with ts-node?
NA

Did you try to run with --files option enabled?
NA

Did you try to run with --debug option enabled?
NA

Do you have a repro example (git repo) with simple steps to reproduce your problem?
I tried on empty folder. i run npm init before the installation.

@merceyz
Copy link

merceyz commented Oct 27, 2020

@whitecolor Seems all versions released after 1.0.0-pre.65 use Windows paths in the bin field which breaks on non-Windows machines. https://registry.yarnpkg.com/ts-node-dev/1.0.0

@cong-min
Copy link

cong-min commented Oct 29, 2020

I installed npm to the latest and it seems to work.

npm i -g npm

@tamaserdfalvi
Copy link

I installed npm to the latest and it seems to work.

npm i -g npm

Strangely enough it fixed it for me.

@AmrAbdalrahman
Copy link

I installed npm to the latest and it seems to work.

npm i -g npm

also fixed for me thank you

@anodynos
Copy link

anodynos commented Nov 2, 2020

Updating npm is not a great solution for docker images - could we please use upath instead to solve Windows only paths?

@merceyz
Copy link

merceyz commented Nov 2, 2020

That dependency wouldn't help as the package.json was published with Windows paths https://registry.yarnpkg.com/ts-node-dev/1.0.0

@wclr
Copy link
Owner

wclr commented Nov 2, 2020

I installed it with all PMs (yarn, npm, pnpm), on windows and linux (wsl), bin paths are alright.

I believe that something wrong with the installed npm version.

@mp3por
Copy link

mp3por commented Feb 20, 2021

Updating the npm is not a solution. Please fix. I still have it on Windows WLS 2 with npm v10.16.0

@wclr
Copy link
Owner

wclr commented Feb 25, 2021

Should be fixed.

@aarhusgregersen
Copy link

aarhusgregersen commented Feb 25, 2021

Should be fixed.

I'm still experiencing the issue, just tried fetching latest version of the library, even specifying it as npm i -D ts-node-dev@1.1.3 but no luck.

Still got:

npm ERR! path /Users/aarhus/code/introDus/backend/node_modules/ts-node-dev/lib\bin.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/aarhus/code/introDus/backend/node_modules/ts-node-dev/lib\bin.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

There's still a windows-style backslash in the bin path, although I cannot find it in the repository, if I download it manually.
Is there something else going on under the hood here, that may be causing issues?
I'm on node v11.2.0 and npm v6.4.1

Update:
Downloading the package here from git, and specifying the local version (npm i -D ../ts-node-dev) still provides the same error, but without the windows style backslash: ENOENT: no such file or directory, chmod '/Users/aarhus/code/introDus/backend/node_modules/ts-node-dev/lib/bin.js'

I tried with versions, 1.1.3, 1.1.2, 1.1.1 and 1.1.0. They all failed with the same error.

@wclr
Copy link
Owner

wclr commented Feb 25, 2021

Ok closing. It was because np was using lame yarn for publishing.

@wclr wclr closed this as completed Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants