Building sp-dev-fx-extensions fail with "Could not find any Visual Studio installation to use"

%3CLINGO-SUB%20id%3D%22lingo-sub-1401739%22%20slang%3D%22en-US%22%3EBuilding%20sp-dev-fx-extensions%20fail%20with%20%22Could%20not%20find%20any%20Visual%20Studio%20installation%20to%20use%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1401739%22%20slang%3D%22en-US%22%3E%3CP%3EHi.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20looking%20to%20apply%20a%20custom%20CSS%20to%20our%20SPO%20sites%2C%20to%20apply%20company%20theming.%20I%20came%20across%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fpnp%2Fsp-dev-fx-extensions%2Ftree%2Fmaster%2Fsamples%2Freact-application-injectcss%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fpnp%2Fsp-dev-fx-extensions%2Ftree%2Fmaster%2Fsamples%2Freact-application-injectcss%2C%26nbsp%3B%3C%2FA%3Ewhich%20looks%20promising%2C%20but%20I'm%20having%20some%20issues.%26nbsp%3B%3C%2FP%3E%3COL%3E%3CLI%3EAccording%20to%20the%20documentation%2C%20I%20thought%20that%20simply%20uploading%20the%20custom%20CSS%20file%20would%20suffice%2C%20but%20apparently%20it%20doesn't%20(unless%20I'm%20doing%20something%20wrong).%20Have%20anyone%20gotten%20this%20to%20work%3F%3C%2FLI%3E%3CLI%3EAs%20a%20plan%20B%2C%20I%20though%20I'd%20build%20and%20deploy%20the%20SPFx%20project%2C%20just%20in%20case%20this%20indeed%20is%20a%20prerequisite.%20I've%20got%20Visual%20Studio%202019%20installed%2C%20but%20it%20looks%20like%20the%20SPFx%20project%20isn't%20compatible%20with%20this%20version%3A%26nbsp%3B%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3Egyp%20ERR!%20find%20VS%20msvs_version%20not%20set%20from%20command%20line%20or%20npm%20config%0Agyp%20ERR!%20find%20VS%20running%20in%20VS%20Command%20Prompt%2C%20installation%20path%20is%3A%0Agyp%20ERR!%20find%20VS%20%22C%3A%5CProgram%20Files%20(x86)%5CMicrosoft%20Visual%20Studio%5C2017%5CProfessional%22%0Agyp%20ERR!%20find%20VS%20-%20will%20only%20use%20this%20version%0Agyp%20ERR!%20find%20VS%20could%20not%20use%20PowerShell%20to%20find%20Visual%20Studio%202017%20or%20newer%0Agyp%20ERR!%20find%20VS%20looking%20for%20Visual%20Studio%202015%0Agyp%20ERR!%20find%20VS%20-%20not%20found%0Agyp%20ERR!%20find%20VS%20not%20looking%20for%20VS2013%20as%20it%20is%20only%20supported%20up%20to%20Node.js%208%0Agyp%20ERR!%20find%20VS%0Agyp%20ERR!%20find%20VS%20**************************************************************%0Agyp%20ERR!%20find%20VS%20You%20need%20to%20install%20the%20latest%20version%20of%20Visual%20Studio%0Agyp%20ERR!%20find%20VS%20including%20the%20%22Desktop%20development%20with%20C%2B%2B%22%20workload.%0Agyp%20ERR!%20find%20VS%20For%20more%20information%20consult%20the%20documentation%20at%3A%0Agyp%20ERR!%20find%20VS%20https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode-gyp%23on-windows%0Agyp%20ERR!%20find%20VS%20**************************************************************%0Agyp%20ERR!%20find%20VS%0Agyp%20ERR!%20configure%20error%0Agyp%20ERR!%20stack%20Error%3A%20Could%20not%20find%20any%20Visual%20Studio%20installation%20to%20use%0Agyp%20ERR!%20stack%20%20%20%20%20at%20VisualStudioFinder.fail%20(C%3A%5CProgram%20Files%5Cnodejs%5Cnode_modules%5Cnpm%5Cnode_modules%5Cnode-gyp%5Clib%5Cfind-visualstudio.js%3A121%3A47)%0Agyp%20ERR!%20stack%20%20%20%20%20at%20C%3A%5CProgram%20Files%5Cnodejs%5Cnode_modules%5Cnpm%5Cnode_modules%5Cnode-gyp%5Clib%5Cfind-visualstudio.js%3A74%3A16%0Agyp%20ERR!%20stack%20%20%20%20%20at%20VisualStudioFinder.findVisualStudio2013%20(C%3A%5CProgram%20Files%5Cnodejs%5Cnode_modules%5Cnpm%5Cnode_modules%5Cnode-gyp%5Clib%5Cfind-visualstudio.js%3A351%3A14)%0Agyp%20ERR!%20stack%20%20%20%20%20at%20C%3A%5CProgram%20Files%5Cnodejs%5Cnode_modules%5Cnpm%5Cnode_modules%5Cnode-gyp%5Clib%5Cfind-visualstudio.js%3A70%3A14%0Agyp%20ERR!%20stack%20%20%20%20%20at%20C%3A%5CProgram%20Files%5Cnodejs%5Cnode_modules%5Cnpm%5Cnode_modules%5Cnode-gyp%5Clib%5Cfind-visualstudio.js%3A372%3A16%0Agyp%20ERR!%20stack%20%20%20%20%20at%20C%3A%5CProgram%20Files%5Cnodejs%5Cnode_modules%5Cnpm%5Cnode_modules%5Cnode-gyp%5Clib%5Cutil.js%3A54%3A7%0Agyp%20ERR!%20stack%20%20%20%20%20at%20C%3A%5CProgram%20Files%5Cnodejs%5Cnode_modules%5Cnpm%5Cnode_modules%5Cnode-gyp%5Clib%5Cutil.js%3A33%3A16%0Agyp%20ERR!%20stack%20%20%20%20%20at%20ChildProcess.exithandler%20(child_process.js%3A310%3A5)%0Agyp%20ERR!%20stack%20%20%20%20%20at%20ChildProcess.emit%20(events.js%3A310%3A20)%0Agyp%20ERR!%20stack%20%20%20%20%20at%20maybeClose%20(internal%2Fchild_process.js%3A1021%3A16)%0Agyp%20ERR!%20System%20Windows_NT%2010.0.17763%0Agyp%20ERR!%20command%20%22C%3A%5C%5CProgram%20Files%5C%5Cnodejs%5C%5Cnode.exe%22%20%22C%3A%5C%5CProgram%20Files%5C%5Cnodejs%5C%5Cnode_modules%5C%5Cnpm%5C%5Cnode_modules%5C%5Cnode-gyp%5C%5Cbin%5C%5Cnode-gyp.js%22%20%22rebuild%22%0Agyp%20ERR!%20cwd%20C%3A%5CUsers%5Cme%5Cprojects%5Csp-dev-fx-extensions%5Csamples%5Creact-application-injectcss%5Cnode_modules%5Cdeasync%0Agyp%20ERR!%20node%20-v%20v12.16.3%0Agyp%20ERR!%20node-gyp%20-v%20v5.1.0%0Agyp%20ERR!%20not%20ok%0ABuild%20failed%E2%80%8B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDoes%20this%20mean%20that%20the%20SPFx%20project%20doesn't%20support%20Visual%20Studio%202019%3F%20Will%20I%20have%20to%20install%20Visual%20Studio%202017%20to%20build%20this%20project%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1401739%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
Contributor

Hi.

 

I'm looking to apply a custom CSS to our SPO sites, to apply company theming. I came across

https://github.com/pnp/sp-dev-fx-extensions/tree/master/samples/react-application-injectcss, which looks promising, but I'm having some issues. 

  1. According to the documentation, I thought that simply uploading the custom CSS file would suffice, but apparently it doesn't (unless I'm doing something wrong). Have anyone gotten this to work?
  2. As a plan B, I though I'd build and deploy the SPFx project, just in case this indeed is a prerequisite. I've got Visual Studio 2019 installed, but it looks like the SPFx project isn't compatible with this version: 

 

gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS running in VS Command Prompt, installation path is:
gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional"
gyp ERR! find VS - will only use this version
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack     at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:310:5)
gyp ERR! stack     at ChildProcess.emit (events.js:310:20)
gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\me\projects\sp-dev-fx-extensions\samples\react-application-injectcss\node_modules\deasync
gyp ERR! node -v v12.16.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
Build failed​

 

Does this mean that the SPFx project doesn't support Visual Studio 2019? Will I have to install Visual Studio 2017 to build this project? 

 

0 Replies