Closed thoni56 closed 5 years ago
Is fsevents required? npm i
gives this warning
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
where is this code running? in node,a browser, electron etc? runtime versions would be helpful.
fsevents is truly optional so don't worry about that and fs is built into node so i don't see how it could be missing.
are you perhaps compiling the code for walkdir itself with typescript? your typescript should only compile the code in your project.
i think ill need a stand alone reproduction of this to help. if you make one or figure it out yourself please post the result here.
Thanks for responding! This is a Vue electron-builder project. I just realized that that code is probably running in the Renderer and I suppose fs
isn't available there (I have limited experience in JavaScript land...). In that case fs
actually wouldn't be a function (although I would have been put on the right track by a message like "fs cannot be resolved".)
I'll check this and get back.
Ok, that seems to be it. fs
is not available in the renderer.
I have an issue I can't understand. I´m trying to use walkdir in a Vue project on Node.js with typescript and I get
and
And the offending code is
Line 140 in walkdir.js is this
I can understand that there needs to be a dependency on
fs
but do I need to do anything particular to make that resolved?