aurelia / template-lint

Sanity check of Aurelia-flavor template HTML
Apache License 2.0
56 stars 17 forks source link

fs.readdir is not a function #198

Open weldonla opened 2 years ago

weldonla commented 2 years ago

I'm submitting a bug report

Please tell us about your environment:

Current behavior: I've installed the aurelia-template-lint, and copied the code in the readme and added it to main.ts. There were a lot of 'resolve' issues that I fixed in my webpack.config.js by forcing certain packages to resolve to a specific installed version of it. fs was one of the packages that I needed to resolve in my webpack file. I've tried resolving it to many different locations. The last resolve I tried was to resolve to the glob v7.2.0 node module since that is what aurelia-template-lint is using fs for, given the stack trace. I'm still stuck on this issue where fs.readdir is not a function (see below).

image

Below is a screenshot of all the additions I had to make to fix all of the resolve errors.

image

the 'child_process' package I could only get to resolve with the thing at the top, child_process: 'empty'. I feel like that might be causing it, but I wasn't able to get it to resolve by installing it and resolving it to it's installed location in node_modules.

I apologize if this should actually be on stack overflow. I'm not sure if this is actually a bug or if I'm just setting it up incorrectly.