question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[ERROR] npm info ok ==> wrong Log Level

See original GitHub issue

I’m very confused, when I see the following log message in my console. What is it? Error or INFO? Please change the Log-Level

[INFO] --- frontend-maven-plugin:1.4:npm (npm info) @ XYZ ---
[INFO] Running 'npm info npm version --always-auth=false --loglevel=info --progress=false --https-proxy=http://localhost:3128 --proxy=http://localhost:3128' in C:\Users\XYZ\XYZ
[ERROR] npm info it worked if it ends with ok
[ERROR] npm info using npm@3.10.10
[ERROR] npm info using node@v6.11.0
[ERROR] npm info attempt registry request try #1 at 09:19:45
[ERROR] npm http request GET http://MY-NPM-REPO/repository/npm-group/npm
[ERROR] npm http 200 http://MY-NPM-REPO/repository/npm-group/npm
[INFO] 6.1.0
[ERROR] npm info ok

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:9
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
just-pajacommented, May 14, 2019

Seen #411.

Sorry to throw links at you, but please see wiki on stderr.

Standard error is another output stream typically used by programs to output error messages or diagnostics.

npm is correctly dumping diagnostic information to stderr. I realize that defining diagnostic information is debatable, but let’s not go there. The point is that not everything in stderr is error.

Because we’re never going to be able to change how maven and npm interpret usage of stdout and stderr, we should treat this plugin as mediator between the two and treat npm’s stderr as diagnostic output, not errors. Maven actually works in simillar way. Check out that all the [INFO]s and [ERROR]s are sent to stdout.

I dare to say that this:

eirslett: At least as far as this plugin is concerned, all it does is forward stdout to Maven’s stdout, and stderr to Maven’s stderr. I’d say it’s a feature, not a bug.

is the wrong approach.

There is one ridiculous example, output of running jest:

[ERROR] PASS test src/reducers/__tests__/forms.js
1reaction
eirslettcommented, Oct 28, 2019

Should be fixed in the latest release, I think?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to solve npm install error “npm ERR! code 1”
To do this, simply copy the whole dependencies section and devDependencies section from package.json and paste it into a text editor as a...
Read more >
Designing Error Messages and a Logging Strategy in Node.js
Learn how to structure helpful error messages and follow a good logging strategy.
Read more >
loglevel - npm
Log things at a given level (trace/debug/info/warn/error) to the console object (as seen in all modern browsers & node. · Filter logging by...
Read more >
Best Practices for Node.js Error-handling - Toptal
They just keep asking themselves “Is Node.js bad at handling errors? ... const customLevels = { levels: { trace: 5, debug: 4, info:...
Read more >
Logs Show Info Status For Warnings Or Errors - Datadog Docs
Use a Grok parser to define a rule with the word() matcher and extract the actual log status. Navigate to Logs Pipelines and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found