-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
Environment
$ node --version
v18.16.1
$ npm --version
9.5.1
$ tsc --version
Version 5.1.6No previous typewriter installation, ran rm -rf node_modules and rg --hidden typewriter. Doing the steps outlined in https://segment.com/docs/protocols/apis-and-extensions/typewriter/#browser-quickstart
Steps
- Install
analytics.jsusing NPM method, sonpm install @segment/analytics-next
$ rg segment/analytics
package.json
20: "@segment/analytics-next": "^1.53.3",- Once you’ve got analytics.js installed, add Typewriter as a developer dependency in your project:
npm install --save-dev typewriter
$ rg typewriter
package.json
47: "typewriter": "^9.1.0",- If you are a snippet user that uses TypeScript, you should also install the npm library as a dev dependency to get the typescript types. I am not a snippet user, so skipping this
- Run npx typewriter init to [...]
- Ready
- Copy working token
nwould not like to store- select tracking plan
- choose
analyticsas directory - language Typescript
- As SDK choose Web (analytics.js)
nfor fine tuning
Configuration Summary:
Name Value
────────────── ─────────────────────────────────────
Tracking Plans *******************
Paths analytics
Language TypeScript
SDK analytics-js
ysave
? Save these settings? Yes
TypeError: Cannot read properties of undefined (reading 'method')
$ ls analytics
ls: cannot access 'analytics': No such file or directory
$ uname -a
Darwin *************.local 22.5.0 Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000 arm64 arm Darwin
Expectation vs. reality
Expected there to be
- no error
- an
analytics/folder
Actual
- got a
typewriter.ymlconfig file but no folder and an error
Metadata
Metadata
Assignees
Labels
No labels