cli icon indicating copy to clipboard operation
cli copied to clipboard

feat: rootless workspace init provides suggestion

Open fritzy opened this issue 3 years ago • 2 comments

Adds a warning message suggesting the use of --include-workspace-root when ENOENT is thrown for the npm init command when specifying one or more workspaces.

fritzy avatar Aug 04 '22 16:08 fritzy

❯ npm init -w thingy
npm WARN Missing package.json. Try with `--include-workspace-root`. 
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /Users/fritzy/projects/scratchpad/test1/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/Users/fritzy/projects/scratchpad/test1/package.json'
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!     /Users/fritzy/.npm/_logs/2022-08-04T16_27_31_574Z-debug-0.log

fritzy avatar Aug 04 '22 16:08 fritzy

no statistically significant performance changes detected

timing results
app-large clean lock-only cache-only cache-only
peer-deps
modules-only no-lock no-cache no-modules no-clean no-clean
audit
npm@8 45.181 ±4.41 26.079 ±0.03 26.718 ±5.05 28.351 ±3.13 4.490 ±0.17 4.195 ±0.09 3.409 ±0.02 16.525 ±0.15 3.420 ±0.05 5.141 ±0.19
#5261 48.996 ±2.69 25.330 ±0.17 31.747 ±12.16 26.839 ±1.52 4.139 ±0.09 4.144 ±0.07 3.343 ±0.10 16.529 ±0.27 3.314 ±0.05 5.023 ±0.45
app-medium clean lock-only cache-only cache-only
peer-deps
modules-only no-lock no-cache no-modules no-clean no-clean
audit
npm@8 32.781 ±2.05 19.481 ±0.07 17.825 ±0.10 19.673 ±0.16 3.889 ±0.06 3.993 ±0.04 3.522 ±0.20 12.379 ±0.10 3.335 ±0.02 4.547 ±0.11
#5261 32.545 ±1.87 19.064 ±0.43 17.567 ±0.10 18.872 ±0.13 3.946 ±0.06 3.836 ±0.11 3.398 ±0.01 12.146 ±0.06 3.235 ±0.04 4.651 ±0.11

npm-cli-bot avatar Aug 04 '22 16:08 npm-cli-bot