BABEL Note: The code generator has deoptimised the styling of “app.js” as it exceeds the max of “100KB in Meteor

This is not a real issue. Just a warning. When babel compiles some code, it try to offer a readable output, but when files become big (>100KB), babel considers (by default) that it’s not useful to keep this option enabled (because yes it’s an option, see https://stackoverflow.com/a/30879872/988941 for more information). It’s not a problem to … Read more

Importing CSS files in Isomorphic React Components

You can’t require css in the component that you are rendering on the server. One way to deal with it is to check if it’s a browser before requiring css. if (process.env.BROWSER) { require(“./style.css”); } In order to make it possible you should set process.env.BROWSER to false (or delete it) on the server server.js delete … Read more

RegeneratorRuntime is not defined

Node js Env – updated December 2015 This question has already been answered, please see accepted answer UNLESS running within NodeJS environment. If like myself, you had the same error message: ‘ReferenceError: regeneratorRuntime is not defined’ but were running Babel within a NodeJS environment, then simply doing the following will likely solve your problem: npm … Read more

webpack imported module is not a constructor

If you are not the library author and are having a problem consuming another library, you may be seeing an error like this: TypeError: [LIBRARY_NAME]__WEBPACK_IMPORTED_MODULE_3__ is not a constructor If that’s the case, you may be importing the library incorrectly in your code (it may be a problem with default exports). Double check the library … Read more

Error while loading config – You appear to be using a native ECMAScript module configuration file (Jest)

TLDR – Changing bable.config.<extension> to bable.config.cjs did the work. Check bable docs if you need a different config. SOLVED: For anyone who encounters this problem. This has got to do with Babel settings. The use of .mjs, cjs or js extension for the babel.config.extension. In my case where I was running LTE Node 12.6.2. I … Read more

How to resolve “Cannot use import statement outside a module” from Jest when running tests?

I was having the same failure (also using Babel, Typescript and Jest), it was driving me crazy for hours! Ended up creating a new babel.config.js file specifically for the tests. I had a large .babelrc that wasn’t getting picked up by jest no matter what I did to it. The main app still uses the … Read more

Where is the location of .babelrc file?

.babelrc is never auto created. You must go to the root directory of your project. Create a file – touch .babelrc, open the file and enter the babel settings here, then save. If you are following https://babeljs.io/blog/2015/10/31/setting-up-babel-6, Setting up Babel 6 and installed all the plugins and presets as stated, this may help. { “presets”: … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)