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

feat: rootless workspace init provides suggestion #5261

Merged
merged 1 commit into from
Jan 2, 2023

Conversation

fritzy
Copy link
Contributor

@fritzy fritzy commented Aug 4, 2022

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 fritzy requested a review from a team as a code owner August 4, 2022 16:28
@fritzy
Copy link
Contributor Author

fritzy commented Aug 4, 2022

❯ 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

@npm-cli-bot
Copy link
Collaborator

npm-cli-bot commented Aug 4, 2022

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

@fritzy fritzy force-pushed the fritzy/workspace-init-error branch 2 times, most recently from 60478af to 97549ae Compare August 17, 2022 00:12
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
test/lib/commands/init.js Outdated Show resolved Hide resolved
@lukekarrys lukekarrys merged commit 753b98e into latest Jan 2, 2023
@lukekarrys lukekarrys deleted the fritzy/workspace-init-error branch January 2, 2023 00:49
@github-actions github-actions bot mentioned this pull request Jan 2, 2023
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

Successfully merging this pull request may close these issues.

None yet

5 participants