Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Why does npm install print junk characters to the console? #10469

Closed
fresheneesz opened this issue Nov 19, 2015 · 6 comments
Closed

Why does npm install print junk characters to the console? #10469

fresheneesz opened this issue Nov 19, 2015 · 6 comments

Comments

@fresheneesz
Copy link

I'm seeing a lot of junk being written to the console on my Centos 6.5 machine with npm v3.3.12 . Stuff like this:

â¢ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ

What is that? Here's some full output I'm getting:

[vagrant@localhost temp]$ npm install proto
â
extract â gunzTarPerm     â â¢ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
runTopLevelLifecycles     â
/home/vagrant/temp
âââ proto@1.0.19

runTopLevelLifecycles     â
npm WARN ENOENT ENOENT: no such file or directory, open '/home/vagrant/temp/package.json'
npm WARN EPACKAGEJSON temp No description
npm WARN EPACKAGEJSON temp No repository field.
npm WARN EPACKAGEJSON temp No README data
runTopLevelLifecycles     â
npm WARN EPACKAGEJSON temp No license field.

It looks like there are some display items, but I can't tell if information is being cut off. It looks like something is broken. Sidenote: why is it complaining about the current directory not having a package.json?

@fresheneesz
Copy link
Author

I'm also seeing this kind of thing in areas where its listing depedencies:

ââ⬠chokidar@1.2.0
â ââ⬠readdirp@2.0.0
â   ââ⬠readable-stream@2.0.2
â     âââ core-util-is@1.0.1
â     âââ inherits@2.0.1
â     âââ isarray@0.0.1
â     âââ string_decoder@0.10.31
ââ⬠cpr@0.4.2
â ââ⬠rimraf@2.4.3
â   ââ⬠glob@5.0.15
â     âââ inherits@2.0.1
âââ UNMET PEER DEPENDENCY file-loader@*
ââ⬠forever@0.14.1
â ââ⬠flatiron@0.4.3
â â ââ⬠prompt@0.2.14
â â   ââ⬠utile@0.2.1
â â     ââ⬠rimraf@2.3.2
â â       ââ⬠glob@4.5.3
â â         âââ inherits@2.0.1
â ââ⬠utile@0.2.1
â   ââ⬠rimraf@2.3.2
â     ââ⬠glob@4.5.3
â       âââ inherits@2.0.1

@othiym23
Copy link
Contributor

If you're on Linux or OS X, do you have your terminal configured to display UTF-8 with ANSI sequences? If you're on Windows, is your system using the default (UTF-8 compliant) code page?

@fresheneesz
Copy link
Author

Ah, I'm using PuTTY and it wasn't configured to display UTF-8. I used this to improve it: http://serverfault.com/questions/378352/can-putty-be-configured-to-display-the-following-utf-8-characters .

So it looks like those characters are attempting to display some kind of progress bar? There are still artifacts being left over and text that looks obscured. Eg installing my package.json has lots of information that looks cut off:

[vagrant@localhost temp]$ npm install
npm WARN install Couldn't install optional dependency: Unsupported
loadDep:micromatch → netw ▀ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
loadDep:micromatch → get  ▀ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
loadDep:micromatch → fetc ▄ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
loadDep:micromatch → fetc ▌ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
loadDep:micromatch → afte ▐ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
loadDep:extglob → mapToRe ▀ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
loadDep:regex-cache → req ▄ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
loadDep:regex-cache → 200 ▌ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
loadDep:regex-cache → net ▌ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
loadDep:regex-cache → 200 ▀ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
loadDep:regex-cache → 200 ▐ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
loadDep:regex-cache → res ▐ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
loadDep:regex-cache → get ▐ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
loadDep:regex-cache → add ▌ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
loadDep:regex-cache → fet ▄ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
loadDep:regex-cache → 200 ▌ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
loadDep:regex-cache → aft ▐ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
loadDep:regex-cache → net ▌ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
loadDep:regex-cache → fet ▌ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
loadDep:array-slice → req ▀ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
loadDep:array-slice → 200 ▐ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
loadDep:repeat-element →  ▀ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
loadDep:repeat-element →  ▌ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
loadDep:repeat-element →  ▀ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
loadDep:repeat-element →  ▀ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
loadDep:repeat-element →  ▐ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
loadDep:repeat-element →  ▄ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
loadDep:fill-range → requ ▐ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
loadDep:fill-range → 200  ▄ ╢█████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

Why not just use an incrementing percent rather than some fancy bar? Also If you're going to use text-based visuals for things like the dependency tree, would it be possible to use characters less likely to be misunderstood by tools that don't expect utf-8?

@jakub-g
Copy link
Contributor

jakub-g commented Nov 23, 2015

I've noticed junk characters in our Jenkins build in "Console output" HTML page which is at URLs like
http://jenkins.localhost/job/.../official/1234/consoleFull

In "raw" TXT mode they are displayed correctly
http://jenkins.localhost/job/.../official/1234/consoleText

It seems Jenkins improperly transforms those Unicode characters when rendering HTML view

22:08:56 [INFO] [INFO] 
22:08:56 [INFO] [INFO] bower@1.5.3 node_modules\bower
22:08:56 [INFO] [INFO] ├── is-root@1.0.0
22:08:56 [INFO] [INFO] ├── stringify-object@1.0.1
22:08:56 [INFO] [INFO] ├── junk@1.0.2
22:08:56 [INFO] [INFO] ├── chmodr@0.1.0
22:08:56 [INFO] [INFO] ├── user-home@1.1.1
22:08:56 [INFO] [INFO] ├── abbrev@1.0.7
22:08:56 [INFO] [INFO] ├── archy@1.0.0
22:08:56 [INFO] [INFO] ├── opn@1.0.2
22:08:56 [INFO] [INFO] ├── graceful-fs@3.0.8
22:08:56 [INFO] [INFO] ├── bower-endpoint-parser@0.2.2

Jenkins ver. 1.532.2

Seems a bug on Jenkins side, will open a bug for Jenkins later - unless someone knows a workaround?

@npm-robot
Copy link

We're closing this issue as it has gone seven days without activity and without being labeled. If we haven't even labeled in issue in seven days then we're unlikely to ever read it.

If you are still experiencing the issue that led to you opening this or this is a feature request you're still interested in then we encourage you to open a new issue. If this was a support issue, you may be better served by joining package.communty and asking your question there.

For more information about our new issue aging policies and why we've instituted them please see our blog post.

@Sri55
Copy link

Sri55 commented Aug 25, 2017

Hi there,

Reopening the issue:

I've noticed junk characters in our Jenkins build in "Console output" HTML page which is at URLs like
http://jenkins.localhost/job/1234/console

In "raw" TXT mode they are displayed correctly
http://jenkins.localhost/job/1234/consoleText

It seems Jenkins improperly transforms those Unicode characters when rendering HTML view

┌─────────────────────────┬──────────┬──────────�
│ │ executed │ failed │
├─────────────────────────┼──────────┼──────────┤
│ iterations │ 1 │ 0 │
├─────────────────────────┼──────────┼──────────┤
│ requests │ 3 │ 0 │
├─────────────────────────┼──────────┼──────────┤
│ test-scripts │ 3 │ 0 │
├─────────────────────────┼──────────┼──────────┤
│ prerequest-scripts │ 0 │ 0 │
├─────────────────────────┼──────────┼──────────┤
│ assertions │ 8 │ 0 │
├─────────────────────────┴──────────┴──────────┤
│ total run duration: 819ms │
├───────────────────────────────────────────────┤
│ total data received: 12.08KB (approx) │
├───────────────────────────────────────────────┤
│ average response time: 188ms │
└───────────────────────────────────────────────┘

I'm on Windows, and my system is using the default (UTF-8 compliant) code page.

using Jenkins 2.1.0.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants