Comments (15)
@mc-lovin @MrAlekhin @nihiser Hey all, I published a new version v0.3.2. Mind try it out? Thanks!
https://www.npmjs.com/package/@amplitude/node
from amplitude-node.
@haoliu-amp I am on node 13.5.0
. Just updated and working fine! Thanks!
from amplitude-node.
It looks correct to me. Did you add @amplitude/node
package as well?
from amplitude-node.
Hello! having the same issue with AMP. added only @amplitude/node
from amplitude-node.
Could you provide more details about this error? Like which line triggered this?
from amplitude-node.
@haoliu-amp the same as here.
- initialized amplitude
- called this event on my
GET
route
Can it be this issue https://stackoverflow.com/questions/45979221/getting-typeerror-listener-argument-must-be-a-function-in-node-js ?
const client = Amplitude.init(config.amplitude.key);
client.logEvent({
event_type: "Node Event",
user_id: "Test",
});
from amplitude-node.
@haoliu-amp did you do any changes to the logEvent
method recently?
maybe there has to be ||
instead of ??
. because as I understand you want to provide a default value.
from amplitude-node.
@MrAlekhin Which version are you using btw? Also would you mind share the stacktrace too?
from amplitude-node.
@haoliu-amp
version 0.3.1
TypeError: "listener" argument must be a function
at ClientRequest.once (events.js:340:11)
at new ClientRequest (_http_client.js:174:10)
at Object.request (http.js:39:10)
at Object.request (https.js:245:15)
at NodeClient.logEvent (/Users/artem/FitCompete/fitcompete_api_v2/node_modules/@amplitude/node/dist/nodeClient.js:47:25)
at Post.findById.then (/Users/artem/FitCompete/fitcompete_api_v2/server/routes/post_routes.js:84:19)
at <anonymous>
at process._tickDomainCallback (internal/process/next_tick.js:229:7)
from amplitude-node.
@MrAlekhin Thank you! Would you like to try 0.2.0 real quick to see if that version works for you?
from amplitude-node.
@haoliu-amp looks like the same error 🤷♂️
TypeError: "listener" argument must be a function
at ClientRequest.once (events.js:340:11)
at new ClientRequest (_http_client.js:174:10)
at Object.request (http.js:39:10)
at Object.request (https.js:245:15)
at NodeClient.logEvent (/Users/artem/FitCompete/fitcompete_api_v2/node_modules/@amplitude/node/dist/nodeClient.js:31:25)
at Post.findById.then (/Users/artem/FitCompete/fitcompete_api_v2/server/routes/post_routes.js:84:19)
at <anonymous>
at process._tickDomainCallback (internal/process/next_tick.js:229:7)
package.lock
"@amplitude/node": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/@amplitude/node/-/node-0.2.0.tgz",
"integrity": "sha512-zod9xiz7So14KyFMYu6/saSLn2iYGpkKxGvdEHOZCXau1yNb/zBcMFSb6FaxkN4sj7ZEaQMI7ATD18Z5Vuk/Mg==",
"requires": {
"tslib": "^1.9.3"
}
},
from amplitude-node.
Wonder what version of node are you using? Mine is v12.16.1.
It looks very similar to https://www.reddit.com/r/learnjavascript/comments/fshsy5/how_do_i_fix_typeerror_listener_argument_must_be/
from amplitude-node.
+1 Having the same issue.
from amplitude-node.
@MrAlekhin @nihiser @nihiser What version of node are you guys using? Look like it might be because of the node version compatibility issue.
from amplitude-node.
@haoliu-amp node version 13.9 here
from amplitude-node.
Related Issues (20)
- Not compatible with Webpack 5 (Next.js 11) HOT 9
- Doesn't work with Next.js in APIs (events seem sent but aren't available on Amplitude dashboard) HOT 9
- Identify event taking too long to resolve HOT 3
- Node.js example has a bug for ES5 HOT 1
- requestTimeoutMillis breaks 1.8.0 -> 1.8.1 HOT 5
- How should I generate the device ID ? HOT 6
- User properties inheritance HOT 6
- UnhandledRejection when amplitude server is unavailable
- includeUtm HOT 1
- ChainAlert: new npm maintainer has published version 1.10.0 of package @amplitude/utils
- ChainAlert: new npm maintainer has published version 1.10.0 of package @amplitude/types
- Getting host verification error while installation npm install amplitude/node HOT 1
- Where can I see the event log in amplitude? HOT 1
- Can we send batch/bulk events at once HOT 1
- 📣 Introducing NEW Amplitude SDK for Node.js [BETA]
- Not compatible with Webpack 5 (Next.js 11) (fix)
- maj tslib to next major HOT 5
- How to track revenue? HOT 3
- insert_id parameter in amplitude android sdk
- Test Issue ticket creation in AMP
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amplitude-node.