create-snowpack-app icon indicating copy to clipboard operation
create-snowpack-app copied to clipboard

Migrating Reactboilerplate app into CSA failing

Open dotamir opened this issue 4 years ago • 2 comments

Hi. I'm trying to migrate our web application into snowpack using CSA React template but I got a weird error that I couldn't find any solution for it. Currently, we're using Reactboilerplate in our web application. But when I migrate codebase into snowpack project without any changes on snowpack configuration I got this error:

Snowpack

  Server starting…

  mount:web_modules.......[READY] mount $WEB_MODULES --to /web_modules
  mount:public............[READY] mount public --to /
  mount:src...............[READY] mount src --to /_dist_
  build:.ts,.tsx..........[READY] (default) esbuild
  build:js,jsx............[READY] (plugin) @snowpack/plugin-babel

▼ Console

  [log] ! updating dependencies...
  [warn] The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
  [warn] The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten
  [warn] The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten

And then stuck in this section.

Does anyone have any idea what is this happening?

Thanks in advance.

dotamir avatar Jul 20 '20 16:07 dotamir

I don't know if it applies, but you may get a similar warning while using rollup and @rollup/plugin-commonjs. I think it is what you'd expect from a global this when parsing ES5+ in strict mode (see Securing JavaScript section).

davelsan avatar Jul 23 '20 11:07 davelsan

Hey @dotamir. Thanks for raising the issue. Do you happen to have a reproduction of this?

drwpow avatar Jul 27 '20 21:07 drwpow