Skip to content

console.log.apply throwing TypeError: Illegal Invocation #255

@anoopelias

Description

@anoopelias

I am trying to test pdf.js in iron-node (Electron) and is getting the below error.

TypeError: Illegal invocation
    at _echo (/Users/anoopelias/Workspace/JavaScript/Mozilla/pdfjs/pdf.js/node_modules/shelljs/src/echo.js:17:15)
    at Function.target.browsertest (/Users/anoopelias/Workspace/JavaScript/Mozilla/pdfjs/pdf.js/make.js:1214:3)
    at Object.global.target.(anonymous function) [as browsertest] (/Users/anoopelias/Workspace/JavaScript/Mozilla/pdfjs/pdf.js/node_modules/shelljs/make.js:28:26)
    at /Users/anoopelias/Workspace/JavaScript/Mozilla/pdfjs/pdf.js/node_modules/shelljs/make.js:38:27
    at Array.forEach (native)
    at /Users/anoopelias/Workspace/JavaScript/Mozilla/pdfjs/pdf.js/node_modules/shelljs/make.js:36:10

Dug through it and then reached this line in shelljs,

It seems this type of usage of console.log.apply may not work everywhere. See relevant StackOverflow link.

One more occurrence of the same here,

Metadata

Metadata

Assignees

Labels

fixBug/defect, or a fix for such a problem

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions