stream-labs / obs-studio-node

libOBS (OBS Studio) for Node.Js, Electron and similar tools
GNU General Public License v2.0
593 stars 99 forks source link

Cannot find module './obs_studio_client.node' or The file cannot be accessed by the system. #1426

Open Tanoshi0625 opened 3 months ago

Tanoshi0625 commented 3 months ago

My environment: OS:Windows 10 22H2 Node: v18.19.0 OSN: 0.23.107 YARN:1.22.21

Please help me, How to use osn in win64?

When i using "require", I got this error.

  1. Error: The file cannot be accessed by the system.

When i using "import", I got this error.

  1. Error: Cannot find module './obs_studio_client.node'

My demo: https://github.com/Tanoshi0625/test-program

summeroff commented 3 months ago

after you run "yarn install" file should be in "node_modules\obs-studio-node" subfolder.

Tanoshi0625 commented 3 months ago

after you run "yarn install" file should be in "node_modules\obs-studio-node" subfolder.

Yeah, it exists in subfolder, but terminal tell me Cannot find module.

summeroff commented 3 months ago

another issue might be .node file is technically a dll. and it might need some other dlls to load. like missing a "Visual C++ Redistributable" is popular issue. try to use https://www.dependencywalker.com to check if it has all dependency.

aza547 commented 3 months ago

Check this perhaps? I have an answer there that might help you. TLDR: Install this: https://aka.ms/vs/17/release/vc_redist.x64.exe/.