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

default-input: Catch errors from npa #71

Merged
merged 2 commits into from
Mar 7, 2018
Merged

Conversation

legodude17
Copy link
Contributor

Before:
image
After:
image

Catches errors from npa instead of letting them propagate

Copy link
Contributor

@addaleax addaleax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping @zkat @iarna ? This was just brought up on a Node.js tracker :)

default-input.js Outdated Show resolved Hide resolved
Move `var spec` from inside `try` to outside.
@legodude17
Copy link
Contributor Author

Thanks for the approval @addaleax! Did the change you suggested.

@mmmm1998
Copy link
Contributor

Well, not good, that I burst in this pull request, but It's usfull change, any status changing (merge/close)?

@legodude17
Copy link
Contributor Author

I'm just waiting for a review from a maintainer.

Copy link
Contributor

@zkat zkat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 thanks! This is a good thing to catch!

@zkat zkat merged commit 5d35945 into npm:master Mar 7, 2018
zkat pushed a commit that referenced this pull request Mar 7, 2018
* default-input: Catch errors from npa

* Move variable declaration

Move `var spec` from inside `try` to outside.
zkat pushed a commit that referenced this pull request Mar 7, 2018
* default-input: Catch errors from npa

* Move variable declaration

Move `var spec` from inside `try` to outside.
@legodude17
Copy link
Contributor Author

Thank you!

@legodude17 legodude17 deleted the patch-1 branch March 8, 2018 15:17
@smashraid
Copy link

Hi I would like to know if this problem is related to this. I executed npm init as Administrator
image

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'init' ]
2 info using npm@5.6.0
3 info using node@v9.10.1
4 silly package data { name: 'angulp',
4 silly package data version: '1.0.0',
4 silly package data description: 'Gulp test',
4 silly package data main: 'main.js',
4 silly package data scripts: { test: 'echo "Error: no test specified" && exit 1' },
4 silly package data author: 'Saulo Tsuchida',
4 silly package data license: 'ISC' }
5 info init written successfully
6 verbose stack Error: ENOENT: no such file or directory, open 'C:\Users\saulo_000\Documents\Development\angularjs\package.json'
7 verbose cwd C:\Users\saulo_000\Documents\Development\angularjs
8 verbose Windows_NT 10.0.16299
9 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "init"
10 verbose node v9.10.1
11 verbose npm v5.6.0
12 error path C:\Users\saulo_000\Documents\Development\angularjs\package.json
13 error code ENOENT
14 error errno -4058
15 error syscall open
16 error enoent ENOENT: no such file or directory, open 'C:\Users\saulo_000\Documents\Development\angularjs\package.json'
17 error enoent This is related to npm not being able to find a file.
18 verbose exit [ -4058, true ]

@smashraid
Copy link

Hi all I was able to fix my problem and is related to an option in windows 10 Controlled folder access was ON
I hope this help someone

image
image
image
image

@legodude17
Copy link
Contributor Author

@smashraid try updating npm

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.

5 participants