Skip to content

Included as stated in readme but I get TypeError: cannot read proprty length of undefined #2

Open

Description

@SumNeuron

Tried to include this in the tutorial from https://code.lengstorf.com/learn-rollup-js/ and got TypeError...

Activity

  1. sgnagnarella commented on Dec 13, 2018

    @sgnagnarella

    I am getting a similar error when turning on source maps.
    This is my rollup.js file

    `
    import commonjs from "rollup-plugin-commonjs";
    import obfuscatorPlugin from "rollup-plugin-javascript-obfuscator";

    export default {
    input: "src/main.js",
    output: {
    file: "build/main.js",
    format: "cjs",
    name: "fwi"
    },
    sourceMap: true,
    sourceMapMode: "inline",
    plugins: [
    commonjs({
    include: "node_modules/**"
    }),
    obfuscatorPlugin({
    compact: true
    })
    ]
    };
    `

    And this is the error I get:

    [!] TypeError: Cannot read property 'length' of undefined TypeError: Cannot read property 'length' of undefined at Link.traceMappings (/Users/sgnagnarella/Documents/SourceCode/pcshim/node_modules/rollup/dist/rollup.js:13559:54) at collapseSourcemaps (/Users/sgnagnarella/Documents/SourceCode/pcshim/node_modules/rollup/dist/rollup.js:13680:21) at /Users/sgnagnarella/Documents/SourceCode/pcshim/node_modules/rollup/dist/rollup.js:14946:27 at process._tickCallback (internal/process/next_tick.js:68:7) at Function.Module.runMain (internal/modules/cjs/loader.js:744:11) at startup (internal/bootstrap/node.js:285:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions