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

bug: installing into an existing directory fails #810

Open
tnolet opened this issue Aug 1, 2023 · 6 comments
Open

bug: installing into an existing directory fails #810

tnolet opened this issue Aug 1, 2023 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@tnolet
Copy link
Member

tnolet commented Aug 1, 2023

Node.js version

18

NPM version

16

@checkly/cli version

4.0.13

Steps to reproduce

  • Create some app directory with a package.json
  • Run npm create checkly
  • Answer ✔ It looks like you are already in a project, would you like to initialize? with yes

What is expected?

It installs a checkly.config.js or .ts file

What is actually happening?

it crashes because it can't find the boilerplate project

✔ It looks like you are already in a project, would you like to initialize? … yes
✖ Couldn't find template "boilerplate-project"
npm ERR! code 1
npm ERR! path /Users/timnolet/WebstormProjects/svelte-tmp
npm ERR! command failed
npm ERR! command sh -c create-cli

npm ERR! A complete log of this run can be found in: /Users/timnolet/.npm/_logs/2023-08-01T07_33_42_468Z-debug-0.log
timnolet@MacBook-Pro-van-Tim svelte-tmp % npm i -D checkly@latest

added 186 packages, and audited 451 packages in 5s

95 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Any additional comments?

No response

@tnolet tnolet added the bug Something isn't working label Aug 1, 2023
@nahuelon
Copy link
Contributor

@tnolet , this seems like a known issue downloading the template when the CLI was released without the v prefix version tag. There are changes in the create-cli pending to be released but I think this issue is not related. I was able to install a project into an existing directory with latest version. Please, let me know if it works for you.

@evdama
Copy link

evdama commented Jan 22, 2024

I'm getting the same error with version 4.5.2

sa@mst: /tmp  npm create checkly
 checkly  v4.5.2 Build and Run Synthetics That Scale

Hi Tom! Let's get you started on your monitoring as code journey!

✔ Where do you want to create your new project? … foo/test
◼  Cool. Your project will be created in the directory "foo/test"

✔ Which template would you like to use for your new project › An advanced project with multiple examples and best practices (recommended)
✖ Couldn't find template "advanced-project"
npm ERR! code 1
npm ERR! path /private/tmp
npm ERR! command failed
npm ERR! command sh -c create-cli

npm ERR! A complete log of this run can be found in: /Users/sa/.npm/_logs/2024-01-22T16_49_49_709Z-debug-0.log
sa@mst: /tmp  cat /Users/sa/.npm/_logs/2024-01-22T16_49_49_709Z-debug-0.log
0 verbose cli /usr/local/bin/node /usr/local/bin/npm
1 info using [email protected]
2 info using [email protected]
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 0ms
5 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 1ms
6 timing config:load:builtin Completed in 1ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:/private/tmp/.npmrc Completed in 0ms
10 timing config:load:project Completed in 1ms
11 timing config:load:file:/Users/sa/.npmrc Completed in 1ms
12 timing config:load:user Completed in 1ms
13 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:setEnvs Completed in 0ms
16 timing config:load Completed in 4ms
17 timing npm:load:configload Completed in 5ms
18 timing config:load:flatten Completed in 1ms
19 timing npm:load:mkdirpcache Completed in 0ms
20 timing npm:load:mkdirplogs Completed in 0ms
21 verbose title npm create checkly
22 verbose argv "create" "checkly"
23 timing npm:load:setTitle Completed in 6ms
24 timing npm:load:display Completed in 0ms
25 verbose logfile logs-max:10 dir:/Users/sa/.npm/_logs/2024-01-22T16_49_49_709Z-
26 verbose logfile /Users/sa/.npm/_logs/2024-01-22T16_49_49_709Z-debug-0.log
27 timing npm:load:logFile Completed in 3ms
28 timing npm:load:timers Completed in 0ms
29 timing npm:load:configScope Completed in 0ms
30 timing npm:load Completed in 21ms
31 silly logfile start cleaning logs, removing 1 files
32 timing arborist:ctor Completed in 1ms
33 silly logfile done cleaning log files
34 http fetch GET 200 https://registry.npmjs.org/create-checkly 1258ms (cache revalidated)
35 timing arborist:ctor Completed in 0ms
36 timing arborist:ctor Completed in 0ms
37 timing command:create Completed in 10909ms
38 verbose stack Error: command failed
38 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:53:27)
38 verbose stack     at ChildProcess.emit (node:events:519:28)
38 verbose stack     at maybeClose (node:internal/child_process:1105:16)
38 verbose stack     at ChildProcess._handle.onexit (node:internal/child_process:305:5)
39 verbose cwd /private/tmp
40 verbose Darwin 23.2.0
41 verbose node v21.6.0
42 verbose npm  v10.2.4
43 error code 1
44 error path /private/tmp
45 error command failed
46 error command sh -c create-cli
47 verbose exit 1
48 timing npm Completed in 10994ms
49 verbose code 1
50 error A complete log of this run can be found in: /Users/sa/.npm/_logs/2024-01-22T16_49_49_709Z-debug-0.log
sa@mst: /tmp

@tnolet
Copy link
Member Author

tnolet commented Jan 22, 2024

@evdama thanks for mentioning this, we will fix it. You can copy and paste the project for now from https://github.com/checkly/checkly-cli/tree/main/examples

@tnolet tnolet reopened this Jan 22, 2024
@tnolet tnolet assigned umutuzgur and unassigned nahuelon Jan 22, 2024
@umutuzgur
Copy link
Member

Hey @evdama, do you also get the same error when you run npm create [email protected]?

@evdama
Copy link

evdama commented Jan 23, 2024

yes, I get the same error running npm create [email protected]

@umutuzgur
Copy link
Member

@evdama I pushed another tag, could you run the command again? I can't repro the problem locally but I have a gut feeling that it might be an issue with the older versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants