enhance-dev/enhance

npm create "@enhance" ./myproject -y* not work

Closed this issue · 1 comments

Hi,

The command :

npm create "@enhance" ./myproject -y

doesn't work on my laptops:

  • Mac Air M1 with node v19
  • PC Fedora 37 with node v18.7.0

I obtain this message for:

npm create "@enhance" abc -y

Failed to create! abc

ENOENT: no such file or directory, rename '/Users/rokkanen/tmp/webc/abc/_.gitignore' -> '/Users/rokkanen/tmp/webc/abc/.gitignore'

npm ERR! code 1
npm ERR! path /Users/rokkanen/tmp/webc
npm ERR! command failed
npm ERR! command sh -c enhance-create abc

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/rokkanen/.npm/_logs/2022-11-25T13_22_50_572Z-debug-0.log

The log:

0 verbose cli /opt/homebrew/Cellar/node/19.1.0/bin/node /opt/homebrew/bin/npm
1 info using npm@9.1.2
2 info using node@v19.1.0
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 0ms
5 timing config:load:file:/opt/homebrew/lib/node_modules/npm/npmrc Completed in 1ms
6 timing config:load:builtin Completed in 2ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:/Users/rokkanen/tmp/webc/.npmrc Completed in 1ms
10 timing config:load:project Completed in 3ms
11 timing config:load:file:/Users/rokkanen/.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:/opt/homebrew/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 7ms
17 timing npm:load:configload Completed in 7ms
18 timing npm:load:mkdirpcache Completed in 0ms
19 timing npm:load:mkdirplogs Completed in 0ms
20 verbose title npm create @enhance abc
21 verbose argv "create" "@enhance" "abc" "--yes"
22 timing npm:load:setTitle Completed in 3ms
23 timing config:load:flatten Completed in 1ms
24 timing npm:load:display Completed in 1ms
25 verbose logfile logs-max:10 dir:/Users/rokkanen/.npm/_logs/2022-11-25T13_22_50_572Z-
26 verbose logfile /Users/rokkanen/.npm/_logs/2022-11-25T13_22_50_572Z-debug-0.log
27 timing npm:load:logFile Completed in 2ms
28 timing npm:load:timers Completed in 0ms
29 timing npm:load:configScope Completed in 0ms
30 timing npm:load Completed in 13ms
31 silly logfile start cleaning logs, removing 1 files
32 silly logfile done cleaning log files
33 timing arborist:ctor Completed in 0ms
34 http fetch GET 200 https://registry.npmjs.org/@enhance%2fcreate 1243ms (cache revalidated)
35 timing arborist:ctor Completed in 0ms
36 timing arborist:ctor Completed in 0ms
37 timing command:create Completed in 1350ms
38 verbose stack Error: command failed
38 verbose stack at ChildProcess. (/opt/homebrew/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:53:27)
38 verbose stack at ChildProcess.emit (node:events:513:28)
38 verbose stack at maybeClose (node:internal/child_process:1098:16)
38 verbose stack at ChildProcess._handle.onexit (node:internal/child_process:304:5)
39 verbose cwd /Users/rokkanen/tmp/webc
40 verbose Darwin 22.1.0
41 verbose node v19.1.0
42 verbose npm v9.1.2
43 error code 1
44 error path /Users/rokkanen/tmp/webc
45 error command failed
46 error command sh -c enhance-create abc
47 verbose exit 1
48 timing npm Completed in 1373ms
49 verbose code 1
50 error A complete log of this run can be found in:
50 error /Users/rokkanen/.npm/_logs/2022-11-25T13_22_50_572Z-debug-0.log

Thank's for your help.

I've tried to reproduce this a bunch of different ways to no avail.
I've updated the command to use the latest version of the enhance create command.

Please give it a try and let me know if you run into any more issues.

You can also use the Begin CLI to generate enhance projects if you continue to run into issues with the npm command.
https://begin.com