You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all big props to everyone involved in shipping v4. Very excited to use this π β¨ πΎ
Description
I'm in the process of moving our code over to use v4 of the node-slack-sdk
The first error our tests were failing on was this one.
It looks like in the instantiation you set the user agent, based on some values in the package.json of the library consumer. In our case we have neither a name nor a version defined in our package.json, so all of our test were failing with TypeError: Cannot read property 'replace' of undefined.
I assume the user agent should be instantiated based on the package name and version of @slack/client as opposed to the ultimate consumer of this library? Or at least in my experience that's how other http request libraries tend set the user agent π¬
You're right, it is supposed to work by getting the name and version of @slack/client. I'll have to take a look into how pjson is not doing what I expected it to do. This is definitely related to #466.
aoberoi
added
the
bug
M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented
label
Mar 9, 2018
the solution i'm proposing involves directly requiring package.json (same as #466). i'm open to other ideas. otherwise i anticipate having a fix out early next week.
First of all big props to everyone involved in shipping v4. Very excited to use this π β¨ πΎ
Description
I'm in the process of moving our code over to use v4 of the node-slack-sdk
The first error our tests were failing on was this one.
It looks like in the instantiation you set the user agent, based on some values in the
package.json
of the library consumer. In our case we have neither a name nor a version defined in ourpackage.json
, so all of our test were failing withTypeError: Cannot read property 'replace' of undefined
.After setting values for
name
andversion
, we got more tests to passI assume the user agent should be instantiated based on the package name and version of
@slack/client
as opposed to the ultimate consumer of this library? Or at least in my experience that's how other http request libraries tend set the user agent π¬node-slack-sdk/src/util.ts
Line 20 in df85321
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)Reproducible in:
@slack/client
version: 4.0.0node version: v8.9.3
Steps to reproduce:
The text was updated successfully, but these errors were encountered: