sqlops-mssql-instance-insights
sqlops-mssql-instance-insights copied to clipboard
Build: BuildVSIX.ps1 currently failing
Currently getting this output when trying to build
PS C:\GitHub\sqlops-mssql-instance-insights> .\BuildVSIX.ps1
Error: Command failed: npm list --production --parseable --depth=99999
npm ERR! missing: sqlops@github:anthonydresser/sqlops-extension-sqlops, required by [email protected]
Error: Missing publisher name
Error: Missing publisher name
Error: Missing publisher name
Error: Missing publisher name
Error: Missing publisher name
Error: Missing publisher name
Error: Missing publisher name
Error: Missing publisher name
Error: Missing publisher name
Error: Missing publisher name
^CTerminate batch job (Y/N)? y
PS C:\GitHub\sqlops-mssql-instance-insights\node_modules\ajv>
Current version
PS C:\GitHub\sqlops-mssql-instance-insights> vsce -V
1.39.0
PS C:\GitHub\sqlops-mssql-instance-insights>
The package is up to 1.44.0 @ https://www.npmjs.com/package/vsce
`` PS C:\GitHub\sqlops-mssql-instance-insights> npm view vsce version 1.44.0 PS C:\GitHub\sqlops-mssql-instance-insights>
Will update package.json and use the latest to see if that helps.
Updated package.json then ran npm update vsce -g
which has brought it up to 1.44.0
Here is the transcript.
PS C:\GitHub\sqlops-mssql-instance-insights> npm update
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
removed 310 packages and moved 27 packages in 15.836s
PS C:\GitHub\sqlops-mssql-instance-insights> vsce -V
1.39.0
PS C:\GitHub\sqlops-mssql-instance-insights> npm update vsce
PS C:\GitHub\sqlops-mssql-instance-insights> vsce -V
1.39.0
PS C:\GitHub\sqlops-mssql-instance-insights> npm update vsce -g
C:\Users\matt_\AppData\Roaming\npm\vsce -> C:\Users\matt_\AppData\Roaming\npm\node_modules\vsce\out\vsce
+ [email protected]
updated 10 packages in 6.065s
PS C:\GitHub\sqlops-mssql-instance-insights> vsce -V
1.44.0
PS C:\GitHub\sqlops-mssql-instance-insights>
Problem was with this line of BuildVSIX.ps1
# Get the packages to build in this repo
$packageFiles = Get-ChildItem -Path $scriptPath -Recurse -Filter 'package.json'
This is legacy code due to the fact that we had multiple packages in the one repo originally. Now that we are using "advanced" extensions which also include npm modules we need to add some exclusions to restrict the recursive nature. In the future we might need to extend this to exclude additional paths or be configurable.,
The code has been changed to
# Get the packages to build in this repo (ignore the node_modules though)
$packageFiles = Get-ChildItem -Path $scriptPath -Recurse -Filter 'package.json' -File | Where-Object DirectoryName -NotLike "$(Join-Path -Path $($scriptPath) -ChildPath 'node_modules')\*";