Hello,
I am trying to incorporate the purecloud-platform-client-v2 in my React/Redux app. When I simply reference the following:
var platformClient = require('purecloud-platform-client-v2')
or
import platformClient from 'purecloud-platform-client-v2';
I get the error when I run any webpack commands (see below).
This error is repeated for each function referenced in the src/purecloud-platform-client-v2/index.js file.
I know you can load the purecloud-platform-client-v2 via CDN, but I would prefer to use NPM.
What is causing the issue?
What additional information do you need from me?
~ Thanks!
Webpack commands:
"scripts": {
"dev": "webpack-dev-server --content-base src --inline --hot",
"error": "webpack --display-error-details",
"bundle": "webpack",
"prod": "webpack -p"
},
Error:
ERROR in ./node_modules/purecloud-platform-client-v2/src/purecloud-platform-client-v2/index.js
Module not found: Error: Can't resolve 'purecloud-platform-client-v2/api/OAuthApi' in '/home/xxxx/LM/node_modules/purecloud-platform-client-v2/src/purecloud-platform-client-v2'
@ ./node_modules/purecloud-platform-client-v2/src/purecloud-platform-client-v2/index.js 4:4-2178
@ ./src/js/actions/v2contactListActions.js
@ ./src/js/components/auth/loginMain.js
@ ./src/js/pages/routes.js
@ ./src/js/client.js
@ multi (webpack)-dev-server/client?http://localhost:3000 webpack/hot/dev-server babel-polyfill ./js/client.js