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

Revert "Set User-Agent for proper activity log sources in Customer.io" #95

Merged
merged 1 commit into from
Jan 27, 2022

Conversation

mike-engel
Copy link
Collaborator

Reverts #93

With #93 I introduced a bug where loading the package would immediately cause an unhandled error because of how the typescript files are compiled and published. It naively believes package.json will be in the parent folder, but it's not when build and published.

I'll fix this in a follow up PR with a more robust solution, but this will prevent more crashes when published.

Uncaught:
Error: ENOENT: no such file or directory, open '/home/mike/node_modules/customerio-node/dist/package.json'
    at Object.openSync (fs.js:462:3)
    at Object.readFileSync (fs.js:364:35)
    at Object.<anonymous> (/home/mike/node_modules/customerio-node/dist/lib/request.js:12:35)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/home/mike/node_modules/customerio-node/dist/package.json'
}

@mike-engel mike-engel added the bug label Jan 27, 2022
@mike-engel mike-engel requested a review from a team January 27, 2022 17:59
@mike-engel mike-engel self-assigned this Jan 27, 2022
@mike-engel mike-engel merged commit cb459e0 into main Jan 27, 2022
@mike-engel mike-engel deleted the revert-93-set-cio-user-agent branch January 27, 2022 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants