Closed LeoIngramBR closed 1 year ago
Please use the issue template
Hi, thanks for prompt response. I've included more details
I just notice that using tedious module (https://github.com/tediousjs/tedious) I'm having same error. Maybe is something related to Power BI Custom Visuals.
Thanks.
Is this running in a true node backend, or is it meant for a browser environment? The dns
module is an inbuilt module in node, so I can't see how else you'd get this error.
What happens if you just try to require the dns
module directly, does it work? If not, you'll need to raise an issue with the powerbi-visuals-tools team, as it's not to do with this library why the dns
module is not available in the runtime
I'm creating a Power BI Custom Visual using https://www.npmjs.com/package/powerbi-visuals-tools
When using the module mssql I'm having this error. There are other 5 similar errors, but for diferent libs, all inside nome_modules\tedious\lib folder.
ERROR in ./node_modules/mssql/node_modules/tedious/lib/connection.js 12:34-48 Module not found: Error: Can't resolve 'dns' in '[folder]\node_modules\mssql\node_modules\tedious\lib' @ ./node_modules/mssql/node_modules/tedious/lib/tedious.js 59:41-64 @ ./node_modules/mssql/lib/tedious/connection-pool.js 3:12-30 @ ./node_modules/mssql/lib/tedious/index.js 4:23-51 @ ./node_modules/mssql/index.js 1:0-41 @ ./src/visual.ts 2:0-29 82:31-42 83:32-43 @ ./.tmp/precompile/visualPlugin.ts 1:0-42 10:12-18 11:23-29
I have already reinstalled module with npm install and npm install --save
Steps to reproduce the error
Expected behaviour:
When run pbiviz start, the last compiler message will be webpack 5.88.2 compiled successfully in 1895 ms
Actual behaviour:
When run pbiviz start, the last compiler message will be webpack 5.88.2 compiled with 6 errors in 7349 ms
Removing const sql = require("mssql"); from code, I have no errors
Configuration:
Software versions