Skip to content

Docs: Unable to create install plugin template #854

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

Closed
captain-yossarian opened this issue Aug 5, 2020 · 11 comments · Fixed by #856 or #863
Closed

Docs: Unable to create install plugin template #854

captain-yossarian opened this issue Aug 5, 2020 · 11 comments · Fixed by #856 or #863
Labels
Playground Issues that affect the Playground

Comments

@captain-yossarian
Copy link

captain-yossarian commented Aug 5, 2020

Repro:
I'm trying to run yarn create typescript-playground-plugin playground-my-plugin

Actual behavior:
This is what I'm receiving

D:\js>yarn create typescript-playground-plugin playground-my-plugin
yarn create v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "create-typescript-playground-plugin@1.2.0" with binaries:
      - create-typescript-playground-plugin
[########] 8/8tar:  E r%r oTro toaple n i n g%  aRreccehiivvee:d F a%i lXefde rtdo   oApveenr a'g\e\ .S\pteaepde   Tim0e'
  Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1985    0  1985    0     0   1985      0 --:--:-- --:--:-- --:--:--  2646
curl: (23) Failed writing body (2111 != 10960)
(node:8348) UnhandledPromiseRejectionWarning: Error: Command failed: curl https://codeload.github.com/microsoft/TypeScript-Website/tar.gz/v2 | tar -xz -C playground-my-plugin --strip=4 TypeScript-Website-2/packages/create-typescript-playground-plugin/template/
    at checkExecSyncError (child_process.js:630:11)
    at execSync (child_process.js:666:15)
    at getTar (C:\Users\sergi\AppData\Local\Yarn\Data\global\node_modules\create-typescript-playground-plugin\index.js:47:3)
    at create (C:\Users\sergi\AppData\Local\Yarn\Data\global\node_modules\create-typescript-playground-plugin\index.js:67:3)
    at Object.<anonymous> (C:\Users\sergi\AppData\Local\Yarn\Data\global\node_modules\create-typescript-playground-plugin\index.js:112:1)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
(node:8348) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise 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_unhandled_rejections_mode). (rejection id: 1)
(node:8348) [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-zero exit code.
Done in 1.18s.

Nodejs: 12.18.3
Yarn: 1.22.4
OS: windows 10

@captain-yossarian captain-yossarian added the Playground Issues that affect the Playground label Aug 5, 2020
@captain-yossarian
Copy link
Author

captain-yossarian commented Aug 5, 2020

I have noticed that problem might be in config

Script "postinstall": "yarn bootstrap; yarn build" does not work on Windows 10
To make it work, it should be yarn bootstrap && yarn build

Also I've tried other plugins.
It looks like babel and rollup do not doing well together on Windows 10.

Is it possible to make plugin bootstrap template for windows 10?

@orta
Copy link
Contributor

orta commented Aug 5, 2020

for sure! I think changing that to && will be fine

@captain-yossarian
Copy link
Author

@orta but it is still don't work. I've tried it. I'm receiving an error that file rollup.config.js dont exists

@orta
Copy link
Contributor

orta commented Aug 6, 2020

It looks like curl failed in your first log:

curl: (23) Failed writing body (2111 != 10960)

Does it still show the same report?

@orta orta reopened this Aug 6, 2020
@captain-yossarian
Copy link
Author

captain-yossarian commented Aug 6, 2020

@orta no, there is another error now:
curl: (23) Failed writing body (0 != 8832)

Full error message:

success Installed "create-typescript-playground-plugin@1.2.0" with binaries:
      - create-typescript-playground-plugin
[########] 8/8  t% aTort:a lE  r r o%r  Roepceeniivnegd  a%r cXhfievred:   FAavielreadg et oS poepeedn   ' \T\i.m\et a p e 0T'i
me     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (23) Failed writing body (0 != 8832)
(node:4264) UnhandledPromiseRejectionWarning: Error: Command failed: curl https://codeload.github.com/microsoft/TypeScript-Website/tar.gz/v2 | tar -xz -C playground-my-plugin --strip=4 TypeScript-Website-2/packages/create-typescript-playground-plugin/template/
    at checkExecSyncError (child_process.js:630:11)
    at execSync (child_process.js:666:15)
    at getTar (C:\Users\sergi\AppData\Local\Yarn\Data\global\node_modules\create-typescript-playground-plugin\index.js:47:3)
    at create (C:\Users\sergi\AppData\Local\Yarn\Data\global\node_modules\create-typescript-playground-plugin\index.js:67:3)
    at Object.<anonymous> (C:\Users\sergi\AppData\Local\Yarn\Data\global\node_modules\create-typescript-playground-plugin\index.js:112:1)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
(node:4264) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise 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_unhandled_rejections_mode). (rejection id: 1)
(node:4264) [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-zero exit code.
Done in 2.12s.

@captain-yossarian
Copy link
Author

captain-yossarian commented Aug 6, 2020

@orta
There is only one plugin which works on my machine, it is svetle plugin
Btw, is there plugin API docs?
Maybe it worth adding some typings for Sandbox, like it is in svetle plugin

@orta
Copy link
Contributor

orta commented Aug 6, 2020

Is it possible that curl https://codeload.github.com/microsoft/TypeScript-Website/tar.gz/v2 just doesn't work in your country?

All of the .d.ts files are downloaded from the website in this script - hardcoding them like in the svelte example means it's probably pretty out of date

@captain-yossarian
Copy link
Author

I don't think that current curl is blocked in my country , I living in EU

@orta
Copy link
Contributor

orta commented Aug 6, 2020

👍 - Does that command work on its own in your terminal?

@captain-yossarian
Copy link
Author

Hard to say : ) It looks like it works, at least I dont see errors
curl

@orta
Copy link
Contributor

orta commented Aug 6, 2020

Hah! Thanks, I've got a repro of this too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Playground Issues that affect the Playground
Projects
None yet
2 participants