angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Uncaught ReferenceError: req is not defined

Open hugodes opened this issue 9 years ago • 7 comments

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

Angular CLI: 1.5.0 Node: 8.9.0 OS: darwin x64 Angular: 5.0.1 ... animations, common, compiler, compiler-cli, core, forms ... http, language-service, platform-browser ... platform-browser-dynamic, platform-server, router

@angular/cli: 1.5.0 @angular-devkit/build-optimizer: 0.0.32 @angular-devkit/core: 0.0.20 @angular-devkit/schematics: 0.0.35 @ngtools/json-schema: 1.1.0 @ngtools/webpack: 1.8.0 @schematics/angular: 0.1.0 typescript: 2.4.2 webpack: 3.8.1

Repro steps.

Serve a project with the --prod flag and look at the console on the browser. I don't have a repo showing this has the error seems to come form one of the polyfills.

The log given by the failure.

Log from the Chrome console:

polyfills.4ce913f73137c8855caa.bundle.js:formatted:3952 Uncaught ReferenceError: req is not defined at polyfills.4ce913f73137c8855caa.bundle.js:formatted:3952 at polyfills.4ce913f73137c8855caa.bundle.js:formatted:3971 at polyfills.4ce913f73137c8855caa.bundle.js:formatted:4042 at Function.r.__load_patch (polyfills.4ce913f73137c8855caa.bundle.js:formatted:3097) at polyfills.4ce913f73137c8855caa.bundle.js:formatted:3933 at u (polyfills.4ce913f73137c8855caa.bundle.js:formatted:2508) at Object. (polyfills.4ce913f73137c8855caa.bundle.js:formatted:2509) at Object.eFQL (polyfills.4ce913f73137c8855caa.bundle.js:formatted:4194) at n (inline.80890a0afa3e2c895544.bundle.js:1) at Object.TU+8 (polyfills.4ce913f73137c8855caa.bundle.js:formatted:1664)

Desired functionality.

I would like for the browser console to be clean

Mention any other details that might be useful.

This only happens with the --prod flag, not the --aot flag (nor does it happen in JIT)

hugodes avatar Nov 15 '17 17:11 hugodes

Duplicate of #8359

benelliott avatar Nov 15 '17 18:11 benelliott

My bad, I did search in the issues before posting, didn't come up in the search results, sorry.

hugodes avatar Nov 15 '17 18:11 hugodes

Hi @hugodes , Uncaught ReferenceError: req is not defined for this issue.

What is the proper fix? Upgrading to cli 1.6 ?

overule avatar Feb 14 '18 00:02 overule

@overule yes :)

hugodes avatar Feb 14 '18 08:02 hugodes

@hugodes can you give me the exact version? I tried upgrading but still having the same issue.

overule avatar Feb 14 '18 13:02 overule

@overule as of now I'm on 1.6.7

hugodes avatar Feb 14 '18 13:02 hugodes

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.