When I try to run the following commands to install the Node.js tracker.
git clone git@github.com : snowplow / snowplow-nodejs-tracker.git
cd snowplow-nodejs-tracker
npm install
npm test
I get the following error when running the npm test:
‘.’ is not recognized as an internal command
or external, an operable program or a batch file.
npm ERR! Test failed. See above for more details.
Is the Node.js tracker not working?
mike
July 25, 2020, 4:55am
2
Maybe try the travis command instead?
./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha -- -R spec ./test/*
It’s likely you’re using NodeJS 12 (or some other more recent version of Node) which it doesn’t currently build correctly with.
However, you’ll find the tracker works when you install it into your application by following the setup guide: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/node-js-tracker/setup/
The NodeJS Tracker is on the list to get some updates soon so we’ll fix some of these issues (and certainly improve build/test). If you do want to contribute to it, then using NodeJS v7 will allow you to run the tests. I use nvm
in cases like this to help me manage multiple Node version on my machine.