Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

js sdk doesn't work under webpack context #5

Open
ytyszxf opened this issue Jan 13, 2017 · 0 comments
Open

js sdk doesn't work under webpack context #5

ytyszxf opened this issue Jan 13, 2017 · 0 comments

Comments

@ytyszxf
Copy link

ytyszxf commented Jan 13, 2017

env: node 6.0+
webpack: 2.0 +
it happens when require('kii-cloud-sdk').
It looks like it happens because it thinks it's under nodejs env, but it is not.

ERROR in ./~/xmlhttprequest/lib/XMLHttpRequest.js
Module not found: Error: Can't resolve 'child_process' in '/Users/georgelin/Desktop/workspace/myApp/status-monitor/client/node_modules/xmlhttprequest/lib'
 @ ./~/xmlhttprequest/lib/XMLHttpRequest.js 15:12-36
 @ ./~/kii-cloud-sdk/KiiSDK.min.js
 @ ./src/shared/services/kii-cloud.service.ts
 @ ./src/app/login/login.service.ts
 @ ./src/app/app.module.ts
 @ ./src/app/index.ts
 @ ./src/main.browser.ts
 @ multi main

ERROR in ./~/xmlhttprequest/lib/XMLHttpRequest.js
Module not found: Error: Can't resolve 'fs' in '/Users/georgelin/Desktop/workspace/myApp/status-monitor/client/node_modules/xmlhttprequest/lib'
 @ ./~/xmlhttprequest/lib/XMLHttpRequest.js 16:9-22
 @ ./~/kii-cloud-sdk/KiiSDK.min.js
 @ ./src/shared/services/kii-cloud.service.ts
 @ ./src/app/login/login.service.ts
 @ ./src/app/app.module.ts
 @ ./src/app/index.ts
 @ ./src/main.browser.ts
 @ multi main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant