Matticusau / sqlops-mssql-instance-insights

SqlOps Studio MSSQL Instance Insights Extension
MIT License
16 stars 3 forks source link

Build: BuildVSIX.ps1 currently failing #13

Open Matticusau opened 6 years ago

Matticusau commented 6 years ago

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 mssql-instance-insights@0.2.3-beta1

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>
Matticusau commented 6 years ago

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.
Matticusau commented 6 years ago

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: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: 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
+ vsce@1.44.0
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>
Matticusau commented 6 years ago

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')\*";