r-script icon indicating copy to clipboard operation
r-script copied to clipboard

require( 'r-script' ) showing error in angularjs 2

Open anfasci opened this issue 8 years ago • 1 comments

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

anfasci avatar Aug 21 '17 11:08 anfasci

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.

macdja38 avatar Jun 26 '18 22:06 macdja38