segmentio / utm-params

parse and get all utm parameters
MIT License
41 stars 7 forks source link

Requires 'type' module, which is 7 years old and can not be loaded. #10

Open mikemaccana opened 5 years ago

mikemaccana commented 5 years ago

Simply running var utm = require('@segment/utm-params') gives:

internal/modules/cjs/loader.js:582
    throw err;
    ^

Error: Cannot find module 'type'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
    at Function.Module._load (internal/modules/cjs/loader.js:506:25)
    at Module.require (internal/modules/cjs/loader.js:636:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (C:\Users\mikem\OneDrive\Documents\appname\appname\node_modules\component-querystr
ing\index.js:7:12)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
mikemaccana commented 5 years ago

Type is https://github.com/Gozala/type#readme which is 7 years old and has no index.js, which is why it can't be loaded.

mikemaccana commented 5 years ago

See fix at https://github.com/Gozala/type/pull/3

mikemaccana commented 5 years ago

(that said, it's probably better to depend on something better maintained)