Importing to create-react-app project
Closed this issue · 2 comments
DeveloperAlly commented
using npm install splunk sdk
then let splunkjs = require('splunk-sdk');
throws this error
19 | // Declare a process environment so that we can set
20 | // some globals here and have interop with node
> 21 | process.env = process.env || {};
22 |
23 | module.exports = root = {
24 | Logger : require('./lib/log').Logger,
shakeelmohamed commented
Hi @AlisonWonderlandApps, this library was originally written to be imported into node projects. You'll want to run the compiled client
directory through browserify (or similar tools) in order to use it with react.
See my comment on the JS logging repo for a starting point: splunk/splunk-javascript-logging#4 (comment)
Feel free to re-open this issue if you get stuck!