Open Matticusau opened 6 years ago
After comparing the sqlops module with the vscode module, I have found that the issue seems to be due to a missing sqlops.d.ts file in the sqlops npm module that is installed. Copying the sqlops.d.ts from the /src/sql/sqlops.d.ts of the sqlopsstudio repo does remove the error, but creates many more!!! Plus that would be undone by any npm install/update
I'm emailing anthonydresser to find out more.
Needed a postinstall step in scripts section of package.json I had the install script referenced in the prepare step but not in the postinstall. This is required as both the vscode and sqlops modules will pull down their *.d.ts files as part of the install script.
was
"scripts": {
"prepare": "node ./node_modules/sqlops/bin/install",
"build": "gulp build",
"compile": "gulp compile",
"watch": "gulp watch",
"postinstall": "node ./node_modules/vscode/bin/install"
},
Needed to be
"scripts": {
"prepare": "node ./node_modules/sqlops/bin/install",
"build": "gulp build",
"compile": "gulp compile",
"watch": "gulp watch",
"postinstall": "node ./node_modules/vscode/bin/install && node ./node_modules/sqlops/bin/install"
},
Then run npm install
and it fixes the issue.
Side note.... also fixed the import for opn by changing
import * as opn from 'opn';
to
const opn = require('opn');
Found that the sample extensions also have an additional task in gulp scripts for copytypings to handle the proposed apis file sqlops.proposed.d.ts.
"scripts": {
"build": "gulp build",
"compile": "gulp compile",
"watch": "gulp watch",
"typings": "gulp copytypings",
"postinstall": "node ./node_modules/vscode/bin/install && node ./node_modules/sqlops/bin/install && gulp copytypings"
},
Also updated the gulp buildtasks file. The step though tries to copy the file from the source so will exclude these for now and stick to manually installing the file.
Gulp Buld is currently reporting the following yet the build/extension works