dabroek / shrinkwrap-to-lockfile

Migrate your npm shrinkwrap to a yarn lockfile without a headache
MIT License
7 stars 0 forks source link

TypeError: version.match is not a function #2

Open mean2me opened 6 years ago

mean2me commented 6 years ago

After executing shrinkwrap-to-lockfile npm-shrinkwrap.json package.json in my project folder, I got this error message:

\AppData\Roaming\npm\node_modules\shrinkwrap-to-lockfile\index.js:23
    result[name] = _.head(version.match(/(\d+\.\d+\.\d+(?:-.+)?)/));
                                  ^

TypeError: version.match is not a function
    at _.reduce (\AppData\Roaming\npm\node_modules\shrinkwrap-to-lockfile\index.js:23:35)
    at \AppData\Roaming\npm\node_modules\shrinkwrap-to-lockfile\node_modules\lodash\lodash.js:906:11
    at \AppData\Roaming\npm\node_modules\shrinkwrap-to-lockfile\node_modules\lodash\lodash.js:4917:15
    at baseForOwn (\AppData\Roaming\npm\node_modules\shrinkwrap-to-lockfile\node_modules\lodash\lodash.js:3002:24)
    at \AppData\Roaming\npm\node_modules\shrinkwrap-to-lockfile\node_modules\lodash\lodash.js:4886:18
    at baseReduce (\AppData\Roaming\npm\node_modules\shrinkwrap-to-lockfile\node_modules\lodash\lodash.js:903:5)
    at Function.reduce (\AppData\Roaming\npm\node_modules\shrinkwrap-to-lockfile\node_modules\lodash\lodash.js:9673:14)
    at getDependencyVersions (\AppData\Roaming\npm\node_modules\shrinkwrap-to-lockfile\index.js:21:12)
    at updatePackageJson (\AppData\Roaming\npm\node_modules\shrinkwrap-to-lockfile\index.js:45:30)
    at shrinkwrapToLockfile (\AppData\Roaming\npm\node_modules\shrinkwrap-to-lockfile\index.js:65:3)
dant89 commented 5 years ago

Same issue here, any luck?