i'm trying to run javascript on my python script and i got this error : Could not install the required module: fs
here is my small python script :
import js2py
context = js2py.EvalJs(enable_require=True)
code1 = '''
var fs = require('fs');
var File = fs.readFileSync('C:\\Users\\SAMSUNG\\Dropbox\\SB.crx', 'base64');
console.log(File);
'''
context.execute(code1)
Already installed it by terminal using : npm install fs
and got this :
(venv) C:\Users\SAMSUNG\PycharmProjects\test>npm install fs
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\SAMSUNG\PycharmProjects\test\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\SAMSUNG\PycharmProjects\test\package.json'
npm WARN babelify@10.0.0 requires a peer of @babel/core@^7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN test No description npm WARN test No repository field.
npm WARN test No README data
npm WARN test No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ fs@0.0.1-security updated 1 package and audited 740 packages in 9.002s
4 packages are looking for funding run `npm fund` for details
found 5 low severity vulnerabilities run `npm audit fix` to fix them, or `npm audit` for details