r-script
r-script copied to clipboard
require( 'r-script' ) showing error in angularjs 2
require( 'r-script' ) showing error in angularjs 2
ERROR in ./~/r-script/index.js Module not found: Error: Can't resolve 'child_process' in 'project_path/node_modules/r-script' @ ./~/r-script/index.js 2:20-44 @ ./src/app/app.module.ts @ ./src/main.ts @ multi webpack-dev-server/client?http://192.168.1.252:4200 ./src/main.ts
You can't run this in a browser.
a) it uses node apis. b) it uses the R binary… which in theory you could probably maybe compile to web assembly, but that's not going to be fun. c) it uses buffers and environment variables.