madskristensen/JavaScriptPrettier

npm install fails

matelich opened this issue · 8 comments

Installed product versions

  • Visual Studio: 2017 Professional 15.4.4
  • This extension: 1.1.21

Description

Below is the output I see whenever I open my static website project. It appears I can't upgrade the Node.js that VS uses.

11/20/2017 8:20:48 PM: npm install prettier@1.4.2 (this can take a few minutes)
11/20/2017 8:20:49 PM: npm WARN npm npm does not support Node.js v5.4.1
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8.
npm WARN npm You can find the latest version at https://nodejs.org/
npm ERR! Buffer.alloc is not a function

Steps to recreate

  1. Configure VS2017 like me
  2. Install prettier
  3. Weep

Current behavior

npm is not happy.

Expected behavior

Successfully make my js pretty.

I am getting the same error.

prettier-error1

prettier-error2

Hello, have you found any solution or workaround to run prettier in vs2017?

Thank you :)

you can install the prettier manually at this location
C:\Users<>\AppData\Local\Microsoft\VisualStudio\15.0_f1aee8cf\Extensions\bdqsagnf.dxh
check the full path. it will be different on your machine based on the hashcode
but i am still trying to figure out how to add come configuration using .prettierrc

Hello,
Thank you very much but it still doesn't work. I have installed the prettier@1.4.2 manually at C:\Users\myname\AppData\Local\Microsoft\VisualStudio\15.0_22f082bf\Extensions\4auxeyxe.iof
where prettier is and restarted. I still have the installing npm modules message again.

If I can arrange some time, I will try to debug that and let you know.
Thanks

The extension is installing prettier@1.4.2 into C:\Users\myname\ directory

you can install latest version which installs prettier@1.8.2 from here
#15 (comment)
I was having issue with our internet proxy and manually installing the package ,did solve the problem.

This should be fixed by the newest CI version. I will close the issue when a new version is published to the public gallery