Skip to content

Undefined while building #191

Closed
Closed

Description

@gravityrail

Description

Got this issue while running npm run build on Node v10 on Linux:

$ npm run build


> @google/[email protected] build /Users/dan/workspace/a8c/vagrant-local-2/www/wordpress-default/public_html/wp-content/plugins/model-viewer
> tsc && rollup -c


./lib/model-viewer.js → ./dist/model-viewer.js...
(!) Circular dependency: lib/model-viewer-base.js -> lib/three-components/Renderer.js -> lib/model-viewer-base.js
created ./dist/model-viewer.js in 1.8s

./lib/test/index.js → ./dist/unit-tests.js...
(!) Circular dependency: lib/model-viewer-base.js -> lib/three-components/Renderer.js -> lib/model-viewer-base.js
created ./dist/unit-tests.js in 1.6s

./examples/dependencies/index.js → ./examples/built/dependencies.js...
(!) `this` has been rewritten to `undefined`
https://rollupjs.org/guide/en#error-this-is-undefined
node_modules/marked/lib/marked.js
1386:   root.marked = marked;
1387: }
1388: })(this || (typeof window !== 'undefined' ? window : global));
         ^
created ./examples/built/dependencies.js in 464ms

Activity

  1. cdata commented on Nov 15, 2018

    @cdata
    Contributor

    Yeah, this is somewhat out of our hands as the warning is about code in a third party library. Classically, this was a very popular mechanism to detect the global object in JavaScript, so it is very common to hit such a warning when bundling.

    Thankfully it's just a warning. I don't think there is anything actionable for us, other than potentially filing issues against the marked library.

  2. cdata commented on Nov 16, 2018

    @cdata
    Contributor

    Going to close this off for now as we are unlikely to fix this on our own. Thanks for reporting!

  3. added
    flag: wontfix
    on Nov 16, 2018
  4. gravityrail commented on Nov 16, 2018

    @gravityrail
    ContributorAuthor

    No problem, thanks for the clarification

  5. jsantell commented on Nov 16, 2018

    @jsantell
    Contributor

    This was a new configuration feature to me, but rollup's onwarn may be able to fix this so we can at least hide the spewing for packages that are known to be noisy

  6. jsantell commented on Nov 19, 2018

    @jsantell
    Contributor

    Reopening since this is an easy fix that's bugging me too :) (easy fix only after discovering rollup's onwarn that is!)

  7. added 2 commits that reference this issue on Nov 19, 2018
    7caa4d5
    30f40ce
  8. self-assigned this
    on Nov 20, 2018
  9. added a commit that references this issue on Feb 4, 2020
    492a3c3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

flag: wontfix

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions