Skip to content

Error on update to Webpack 4.0.1 #9793

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
niklissad opened this issue Feb 27, 2018 · 16 comments
Closed

Error on update to Webpack 4.0.1 #9793

niklissad opened this issue Feb 27, 2018 · 16 comments

Comments

@niklissad
Copy link

Versions

> ng --version

    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/
    
Angular CLI: 1.7.1
Node: 8.9.4
OS: darwin x64
Angular: 5.2.6
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router
... service-worker

@angular/cli: 1.7.1
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.3.2
@angular-devkit/schematics: 0.3.2
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.1
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
typescript: 2.6.2
webpack: 4.0.1

Repro steps

  • Update @angular/cli to 1.7.1
  • ng update
  • npm install webpack

Observed behavior

> ng build --prod --environment=current --output-hashing=none --build-optimizer

  0% compiling
An error occured during the build:
TypeError: Cannot read property 'thisCompilation' of undefined
    at NodeTemplatePlugin.apply (/Users/niklissad/Sites/adwise/fishad/frontend/node_modules/webpack/lib/node/NodeTemplatePlugin.js:19:18)
    at Compiler.apply (/Users/niklissad/Sites/adwise/fishad/frontend/node_modules/tapable/lib/Tapable.js:375:16)
    at Object.compileTemplate (/Users/niklissad/Sites/adwise/fishad/frontend/node_modules/html-webpack-plugin/lib/compiler.js:48:17)
    at Compiler.<anonymous> (/Users/niklissad/Sites/adwise/fishad/frontend/node_modules/html-webpack-plugin/index.js:47:40)
    at Compiler.applyPluginsParallel (/Users/niklissad/Sites/adwise/fishad/frontend/node_modules/tapable/lib/Tapable.js:293:14)
    at applyPluginsAsync.err (/Users/niklissad/Sites/adwise/fishad/frontend/node_modules/@angular/cli/node_modules/webpack/lib/Compiler.js:499:9)
    at Compiler.applyPluginsAsyncSeries (/Users/niklissad/Sites/adwise/fishad/frontend/node_modules/tapable/lib/Tapable.js:195:46)
    at Compiler.compile (/Users/niklissad/Sites/adwise/fishad/frontend/node_modules/@angular/cli/node_modules/webpack/lib/Compiler.js:492:8)
    at readRecords.err (/Users/niklissad/Sites/adwise/fishad/frontend/node_modules/@angular/cli/node_modules/webpack/lib/Compiler.js:279:11)
    at Compiler.readRecords (/Users/niklissad/Sites/adwise/fishad/frontend/node_modules/@angular/cli/node_modules/webpack/lib/Compiler.js:391:11)
    at applyPluginsAsync.err (/Users/niklissad/Sites/adwise/fishad/frontend/node_modules/@angular/cli/node_modules/webpack/lib/Compiler.js:276:10)
    at next (/Users/niklissad/Sites/adwise/fishad/frontend/node_modules/tapable/lib/Tapable.js:202:11)
    at Compiler.compiler.plugin (/Users/niklissad/Sites/adwise/fishad/frontend/node_modules/@angular/cli/node_modules/webpack/lib/CachePlugin.js:51:59)
    at Compiler.applyPluginsAsyncSeries (/Users/niklissad/Sites/adwise/fishad/frontend/node_modules/tapable/lib/Tapable.js:206:13)
    at applyPluginsAsync.err (/Users/niklissad/Sites/adwise/fishad/frontend/node_modules/@angular/cli/node_modules/webpack/lib/Compiler.js:273:9)
    at next (/Users/niklissad/Sites/adwise/fishad/frontend/node_modules/tapable/lib/Tapable.js:202:11)
Cannot read property 'thisCompilation' of undefined

Desired behavior

Working build

Mention any other details that might be useful (optional)

I have this problem also with

npm install @angular/cli
ng new w4
cd w4
npm install webpack
npm run build

Also on other macbook which I don't use for development with MacOS 10.13.3

@filipesilva
Copy link
Contributor

To update the version of webpack, it must be updated in the Angular CLI package itself. Installing another version of webpack on the project dependencies is neither support nor will work. You would end up having multiple webpack dependencies in your project and this does not work.

We're working on an update for the next major version.

@DanPride
Copy link

Same issue. I also made the mistake of updating webpack independently but no don't seem to be able to get a working build now now matter what I do. Deleted node folder/npm i with no change in result

@JanTheHun
Copy link

@DanPride

I had the same issue, made the same mistake of upgrading webpack independently.
This is how I was finally able to solve the issue:

npm remove webpack
npm install [email protected]

webpack's newest version (4.0.0) seems to be buggy

@iSanjayAchar
Copy link

@JanTheHun

Your solution did resolve the issue for me. Thanks :)

@vduzh
Copy link

vduzh commented Mar 4, 2018

I had the same problems. Update @angular/cli to 1.7.2 helped

@Marciodgms
Copy link

@JanTheHun Your solution did resolve the issue for me. Thanks :)

@NeyazA
Copy link

NeyazA commented Mar 9, 2018

@DanPride Thanks a lot man.... your solution below worked fine for me.

npm remove webpack
npm install [email protected]

Many Thanks

@anish-fullstack
Copy link

Thanks.. It worked for me too :)

@martianmartian
Copy link

notice that there might be 1. global webpack 2. local webpack
two things are involved. you have to remove and re-install both to fix the issue.

@fsaldivars
Copy link

Thanks @DanPride it works for me.
npm remove webpack
npm install [email protected]

@HoldOffHunger
Copy link

@JanTheHun : Thank you!! That worked perfectly.

This was the only snag I hit when updating a 1+ year old version of ReactJS on my app. But now everything's perfectly back to normal!

@katsisaac50
Copy link

@JanTheHun : Thank you!! That worked perfectly.

@douglasnaphas
Copy link

npm remove webpack
npm install [email protected]

fixed the issue for me using AWS CodeBuild, Ubuntu 14.04, and Node 10.

@amitesh786
Copy link

amitesh786 commented Oct 26, 2018

Angular webpack issue - I have facing this error from 1 week - could anyone support me why this error comes in picture

Run

npm run webpack-dev-server --inline --progress --port 8080

Console Error


 10% building modules 3/3 modules 0 active
Project is running at http://localhost:8080/
webpack output is served from /
404s will fallback to /index.html
 10% building modules 7/10 modules 3 active ...
[at-loader] Using [email protected] from typescript and "tsconfig.json" from ../src/tsconfig.json.

 **94% asset optimization
[at-loader] Checking started in a separate process...**

**[at-loader] Checking finished with 124 errors**
chunk    {0} vendor.js (vendor) 2.74 MB {2} [initial] [rendered]
chunk    {1} app.js (app) 12.1 kB {0} [initial] [rendered]
chunk    {2} polyfills.js (polyfills) 626 kB [entry] [rendered]

ERROR in [at-loader]./node_modules/@angular/common/src/location/platform_location.d.ts:47:59
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/common/src/pipes/async_pipe.d.ts:47:23
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/common/src/platform_id.d.ts:8:42
    TS1039: Initializers are not allowed in ambient contexts.

ERROR in [at-loader] ./node_modules/@angular/common/src/platform_id.d.ts:9:41
    TS1039: Initializers are not allowed in ambient contexts.

ERROR in [at-loader] ./node_modules/@angular/common/src/platform_id.d.ts:10:45
    TS1039: Initializers are not allowed in ambient contexts.

ERROR in [at-loader] ./node_modules/@angular/common/src/platform_id.d.ts:11:44
    TS1039: Initializers are not allowed in ambient contexts.

ERROR in [at-loader] ./node_modules/@angular/compiler/src/aot/compiler.d.ts:40:47
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/compiler/src/aot/compiler_host.d.ts:18:33
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/compiler/src/i18n/extractor.d.ts:14:33
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/compiler/src/i18n/extractor.d.ts:22:35
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/compiler/src/jit/compiler.d.ts:43:49
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/compiler/src/jit/compiler.d.ts:45:65
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/compiler/src/metadata_resolver.d.ts:71:104
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/compiler/src/resource_loader.d.ts:13:23
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/compiler/src/util.d.ts:2:36
    TS1039: Initializers are not allowed in ambient contexts.

ERROR in [at-loader] ./node_modules/@angular/compiler/src/util.d.ts:26:40
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/core/src/animation/animation_metadata_wrapped.d.ts:12:33
    TS1039: Initializers are not allowed in ambient contexts.

ERROR in [at-loader] ./node_modules/@angular/core/src/animation/dsl.d.ts:81:33
    TS1039: Initializers are not allowed in ambient contexts.

ERROR in [at-loader] ./node_modules/@angular/core/src/application_init.d.ts:21:27
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/core/src/application_ref.d.ts:116:76
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/core/src/application_ref.d.ts:132:110
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/core/src/application_ref.d.ts:162:67
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/core/src/application_ref.d.ts:164:101
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/core/src/errors.d.ts:9:33
    TS1039: Initializers are not allowed in ambient contexts.

ERROR in [at-loader] ./node_modules/@angular/core/src/errors.d.ts:10:43
    TS1039: Initializers are not allowed in ambient contexts.

ERROR in [at-loader] ./node_modules/@angular/core/src/errors.d.ts:11:42
    TS1039: Initializers are not allowed in ambient contexts.

ERROR in [at-loader] ./node_modules/@angular/core/src/errors.d.ts:12:43
    TS1039: Initializers are not allowed in ambient contexts.

ERROR in [at-loader] ./node_modules/@angular/core/src/errors.d.ts:13:35
    TS1039: Initializers are not allowed in ambient contexts.

ERROR in [at-loader] ./node_modules/@angular/core/src/linker/compiler.d.ts:43:49
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/core/src/linker/compiler.d.ts:51:65
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/core/src/linker/ng_module_factory_loader.d.ts:14:34
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/core/src/linker/system_js_ng_module_factory_loader.d.ts:28:25
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/core/src/render/api.d.ts:109:36
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/core/src/util/lang.d.ts:12:53
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/core/testing/src/before_each.d.ts:1:59
    TS1039: Initializers are not allowed in ambient contexts.

ERROR in [at-loader] ./node_modules/@angular/core/testing/src/component_fixture.d.ts:74:19
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/core/testing/src/component_fixture.d.ts:79:26
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/core/testing/src/test_bed.d.ts:85:33
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/core/testing/src/test_bed.d.ts:146:26
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/http/src/backends/browser_jsonp.d.ts:1:33
    TS1039: Initializers are not allowed in ambient contexts.

ERROR in [at-loader] ./node_modules/@angular/platform-browser-dynamic/src/resource_loader/resource_loader_impl.d.ts:10:23
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/platform-browser/src/dom/dom_renderer.d.ts:14:41
    TS1039: Initializers are not allowed in ambient contexts.

ERROR in [at-loader] ./node_modules/@angular/router/src/config.d.ts:309:85
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/router/src/interfaces.d.ts:78:99
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/router/src/interfaces.d.ts:157:109
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/router/src/interfaces.d.ts:229:162
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/router/src/interfaces.d.ts:299:89
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/router/src/interfaces.d.ts:367:50
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/router/src/router.d.ts:275:70
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/router/src/router.d.ts:297:59
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/router/src/router_module.d.ts:186:23
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@angular/router/src/shared.d.ts:15:37
    TS1039: Initializers are not allowed in ambient contexts.

ERROR in [at-loader] ./node_modules/@angular/router/src/utils/collection.d.ts:28:79
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:355:48
    TS2304: Cannot find name 'PropertyKey'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:356:52
    TS2304: Cannot find name 'PropertyKey'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:357:34
    TS2304: Cannot find name 'PropertyKey'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:358:34
    TS2304: Cannot find name 'PropertyKey'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:359:34
    TS2304: Cannot find name 'PropertyKey'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:360:61
    TS2304: Cannot find name 'PropertyKey'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:361:60
    TS2304: Cannot find name 'PropertyKey'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:362:65
    TS2304: Cannot find name 'PropertyKey'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:362:97
    TS2304: Cannot find name 'PropertyKey'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:363:60
    TS2304: Cannot find name 'PropertyKey'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:364:58
    TS2304: Cannot find name 'PropertyKey'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:365:59
    TS2304: Cannot find name 'PropertyKey'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:366:58
    TS2304: Cannot find name 'PropertyKey'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:367:61
    TS2304: Cannot find name 'PropertyKey'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:367:117
    TS2304: Cannot find name 'PropertyKey'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:368:42
    TS2304: Cannot find name 'PropertyKey'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:370:81
    TS2304: Cannot find name 'PropertyKey'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:371:78
    TS2304: Cannot find name 'PropertyKey'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:372:76
    TS2304: Cannot find name 'PropertyKey'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:373:73
    TS2304: Cannot find name 'PropertyKey'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:461:39
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:469:59
    TS2304: Cannot find name 'PropertyKey'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:470:59
    TS2304: Cannot find name 'PropertyKey'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:472:48
    TS2304: Cannot find name 'PropertyKey'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:473:69
    TS2304: Cannot find name 'PropertyKey'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:477:40
    TS2304: Cannot find name 'PropertyKey'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:479:48
    TS2304: Cannot find name 'PropertyKey'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:695:55
    TS2304: Cannot find name 'PropertyKey'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:696:45
    TS2304: Cannot find name 'PropertyKey'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:829:20
    TS2304: Cannot find name 'PromiseConstructor'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:859:35
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:1486:36
    TS2339: Property 'for' does not exist on type 'SymbolConstructor'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:1490:43
    TS2339: Property 'hasInstance' does not exist on type 'SymbolConstructor'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:1494:50
    TS2339: Property 'isConcatSpreadable' does not exist on type 'SymbolConstructor'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:1502:38
    TS2339: Property 'keyFor' does not exist on type 'SymbolConstructor'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:1506:37
    TS2339: Property 'match' does not exist on type 'SymbolConstructor'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:1510:39
    TS2339: Property 'replace' does not exist on type 'SymbolConstructor'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:1514:38
    TS2339: Property 'search' does not exist on type 'SymbolConstructor'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:1518:39
    TS2339: Property 'species' does not exist on type 'SymbolConstructor'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:1522:37
    TS2339: Property 'split' does not exist on type 'SymbolConstructor'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:1526:43
    TS2339: Property 'toPrimitive' does not exist on type 'SymbolConstructor'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:1530:43
    TS2339: Property 'toStringTag' does not exist on type 'SymbolConstructor'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:1534:43
    TS2339: Property 'unscopables' does not exist on type 'SymbolConstructor'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:2305:36
    TS2339: Property 'for' does not exist on type 'SymbolConstructor'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:2309:43
    TS2339: Property 'hasInstance' does not exist on type 'SymbolConstructor'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:2313:50
    TS2339: Property 'isConcatSpreadable' does not exist on type 'SymbolConstructor'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:2321:38
    TS2339: Property 'keyFor' does not exist on type 'SymbolConstructor'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:2325:37
    TS2339: Property 'match' does not exist on type 'SymbolConstructor'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:2329:39
    TS2339: Property 'replace' does not exist on type 'SymbolConstructor'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:2333:38
    TS2339: Property 'search' does not exist on type 'SymbolConstructor'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:2337:39
    TS2339: Property 'species' does not exist on type 'SymbolConstructor'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:2341:37
    TS2339: Property 'split' does not exist on type 'SymbolConstructor'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:2345:43
    TS2339: Property 'toPrimitive' does not exist on type 'SymbolConstructor'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:2349:43
    TS2339: Property 'toStringTag' does not exist on type 'SymbolConstructor'.

ERROR in [at-loader] ./node_modules/@types/core-js/index.d.ts:2353:43
    TS2339: Property 'unscopables' does not exist on type 'SymbolConstructor'.

ERROR in [at-loader] ./node_modules/rxjs/Observable.d.ts:68:60
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/rxjs/Observable.d.ts:68:70
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/rxjs/observable/PromiseObservable.d.ts:40:31
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/rxjs/observable/PromiseObservable.d.ts:41:26
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/rxjs/operator/toPromise.d.ts:2:60
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/rxjs/operator/toPromise.d.ts:3:79
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./node_modules/rxjs/operator/toPromise.d.ts:3:89
    TS2304: Cannot find name 'Promise'.

ERROR in [at-loader] ./src/app/app.component.ts:8:14
    TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning.

ERROR in [at-loader] ./src/app/app.module.ts:15:14
    TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning.

ERROR in [at-loader] ./src/app/components/container/container.component.spec.ts:5:34
    TS2307: Cannot find module '@angular/common/http'.

ERROR in [at-loader] ./src/app/components/container/container.component.ts:10:14
    TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning.

ERROR in [at-loader] ./src/app/components/header/header.component.ts:8:14
    TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning.

ERROR in [at-loader] ./src/app/services/ServiceAccordion.ts:1:28
    TS2307: Cannot find module '@angular/common/http'.

ERROR in [at-loader] ./src/app/services/ServiceAccordion.ts:6:14
    TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning.

ERROR in [at-loader] ./src/main.ts:7:43
    TS2339: Property 'ENV' does not exist on type 'ProcessEnv'.

ERROR in [at-loader] ./src/polyfills.ts:84:17
    TS2339: Property 'ENV' does not exist on type 'ProcessEnv'.
Child html-webpack-plugin for "index.html":
    chunk    {0} index.html 662 bytes [entry] [rendered]
webpack: Failed to compile.

Package.json/tsconfig.json

  • I have take from angular webpack https://v5.angular.io/guide/webpack

Please share if anyone resolve this issue awaiting...

@khateeb321
Copy link

@DanPride

I had the same issue, made the same mistake of upgrading webpack independently.
This is how I was finally able to solve the issue:

npm remove webpack
npm install [email protected]

webpack's newest version (4.0.0) seems to be buggy

Worked like a charm!

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests