Skip to content

Error using meow with zeit/pkg #84

@thiagodp

Description

@thiagodp

When using meow with zeit/pkg, I'm receiving the error:

TypeError: Cannot read property 'scripts' of undefined
    at normalize (C:\snapshot\...\node_modules\normalize-package-data\lib\normalize.js:25:12)
    at module.exports (C:\snapshot\...\node_modules\meow\index.js:55:2)

This can be solved by replacing

const pkg = opts.pkg;

with

const pkg = opts.pkg || {};

at the line 50.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions