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

Cannot print to browser because of missing file or directory. #116

Closed
RetroAnkit opened this issue Sep 24, 2021 · 2 comments
Closed

Cannot print to browser because of missing file or directory. #116

RetroAnkit opened this issue Sep 24, 2021 · 2 comments

Comments

@RetroAnkit
Copy link

I'm using Linux and after clicking on print, I got this error in browser:

Error: ENOENT: no such file or directory, open '/home/pc/.vscode-oss/extensions/pdconsec.vscode-print-0.9.8/node_modules/highlight.js/styles/default.css'
	at Object.openSync (fs.js:476:3)
	at Object.func [as openSync] (electron/js2c/asar_bundle.js:5:1846)
	at Object.readFileSync (fs.js:377:35)
	at Object.e.readFileSync (electron/js2c/asar_bundle.js:5:8872)
	at T (/home/pc/.vscode-oss/extensions/pdconsec.vscode-print-0.9.8/dist/extension.js:2:908842)
	at /home/pc/.vscode-oss/extensions/pdconsec.vscode-print-0.9.8/dist/extension.js:2:906535
	at Generator.next (<anonymous>)
	at /home/pc/.vscode-oss/extensions/pdconsec.vscode-print-0.9.8/dist/extension.js:2:900819
	at new Promise (<anonymous>)
	at a (/home/pc/.vscode-oss/extensions/pdconsec.vscode-print-0.9.8/dist/extension.js:2:900564)
	at /home/pc/.vscode-oss/extensions/pdconsec.vscode-print-0.9.8/dist/extension.js:2:905132
	at /home/pc/.vscode-oss/extensions/pdconsec.vscode-print-0.9.8/dist/extension.js:2:908481
	at /home/pc/.vscode-oss/extensions/pdconsec.vscode-print-0.9.8/dist/extension.js:2:904309
	at Generator.next (<anonymous>)
	at /home/pc/.vscode-oss/extensions/pdconsec.vscode-print-0.9.8/dist/extension.js:2:900819
	at new Promise (<anonymous>)
	at a (/home/pc/.vscode-oss/extensions/pdconsec.vscode-print-0.9.8/dist/extension.js:2:900564)
	at Server.<anonymous> (/home/ankit/.vscode-oss/extensions/pdconsec.vscode-print-0.9.8/dist/extension.js:2:904074)
	at Server.emit (events.js:315:20)
	at parserOnIncoming (_http_server.js:874:12)
	at HTTPParser.parserOnHeadersComplete (_http_common.js:126:17)
@PeterWone
Copy link
Collaborator

PeterWone commented Sep 24, 2021

The error clearly states what is missing and where it should be. This raises two questions:

  • Why isn't it there?
  • What can you do about it?

Why isn't it there?

  • The installation was incomplete even though the missing files are in the VSIX file (I checked).
  • You're not using VS Code, you're using a non-standard fork of it which I can tell by the name of the folder /home/pc/.vscode-oss
  • You're using an obsolete version of the extension. This is probably because your non-standard build of VS Code uses this site https://open-vsx.org/extension/pdconsec/vscode-print which is always well behind the curve.

How on Earth can anyone mess up a one click install? This is an interesting question (you aren't the first). Possibly by using a non-standard version of VS Code?

What can you do about it?

This isn't a failure of the extension, vscode-oss has failed to install the dependencies shipped in the VSIX. Here's the thing: it's designed and tested and it works just fine with the installer in Microsoft Visual Studio Code. Not the various forks. Non-standard versions of VS Code make up such a tiny portion of the user base that I cannot give this kind of installer problem priority over standard installations.

Perhaps you could raise an installer issue on the code-oss repository

In the short term, how can you patch your own setup?

  • Check whether that path exists, starting with /home/pc/.vscode-oss
  • If the path is valid then add the files yourself.

VSIX files are just zip files. If you rename one and look inside you will find this

image

which contains this

image

@matkoniecz
Copy link

How on Earth can anyone mess up a one click install? This is an interesting question (you aren't the first). Possibly by using a non-standard version of VS Code?

yep, I use VSCodium that apparently is causing some issues

Perhaps you could raise an installer issue on the code-oss repository

Done! VSCodium/vscodium#928

In the short term, how can you patch your own setup?

In my case entire node_modules was missing.

It is also missing from VSIX file at https://open-vsx.org/extension/pdconsec/vscode-print

It is not missing from VSIX file at https://marketplace.visualstudio.com/items?itemName=pdconsec.vscode-print

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

No branches or pull requests

3 participants