Aspnetcore-angular-universal: has no exported member 'REQUEST' and 'ORIGIN_URL'.

Created on 22 Mar 2018  路  8Comments  路  Source: TrilonIO/aspnetcore-angular-universal

Hi all,
I'm trying to run application with "npm run build:dev" but it return the following error:

```
ERROR in [at-loader] ./ClientApp/app/app.component.ts:10:10
TS2305: Module '"C:/Users/franc/Desktop/Teamstepbystep/temp/aspnetcore-angular2-universal-master (1)/aspnetcore-angular2-universal-master/node_modules/@nguniversal/aspnetcore-engine/index"' has no exported member 'REQUEST'.

ERROR in [at-loader] ./ClientApp/app/app.module.browser.ts:6:10
    TS2305: Module '"C:/Users/franc/Desktop/Teamstepbystep/temp/aspnetcore-angular2-universal-master (1)/aspnetcore-angular2-universal-master/node_modules/@nguniversal/aspnetcore-engine/index"' has no exported member 'ORIGIN_URL'.

ERROR in [at-loader] ./ClientApp/app/app.module.browser.ts:6:22
    TS2305: Module '"C:/Users/franc/Desktop/Teamstepbystep/temp/aspnetcore-angular2-universal-master (1)/aspnetcore-angular2-universal-master/node_modules/@nguniversal/aspnetcore-engine/index"' has no exported member 'REQUEST'.

ERROR in [at-loader] ./ClientApp/app/app.module.ts:27:10
    TS2305: Module '"C:/Users/franc/Desktop/Teamstepbystep/temp/aspnetcore-angular2-universal-master (1)/aspnetcore-angular2-universal-master/node_modules/@nguniversal/aspnetcore-engine/index"' has no exported member 'ORIGIN_URL'.

ERROR in [at-loader] ./ClientApp/app/shared/user.service.ts:5:10
    TS2305: Module '"C:/Users/franc/Desktop/Teamstepbystep/temp/aspnetcore-angular2-universal-master (1)/aspnetcore-angular2-universal-master/node_modules/@nguniversal/aspnetcore-engine/index"' has no exported member 'ORIGIN_URL'.

```
My configuration:

Angular CLI: 1.7.3
Node: 6.13.1
OS: win32 x64
Angular: 5.2.9
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic
... platform-server, router

angular/cli: 1.7.3
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.2
schematics/angular: 0.3.2
schematics/package-update: 0.3.2
typescript: 2.5.3
webpack-bundle-analyzer: 2.11.1
webpack-hot-middleware: 2.21.2
webpack-merge: 4.1.2
webpack: 3.11.0

Angular Universal bug On hold bug ng-AspnetCoreEngine

Most helpful comment

Take a look at the commit Mark mentions above. The import for tokens has changed, it鈥檚 now @nguniversal/aspnetcore-engine/tokens

All 8 comments

Hey thanks for logging this! The team is actually working on it, it looks like version beta.7 of the aspnetcore-engine (and other modules within @nguniversal had an issue when published)

It's being fixed via: https://github.com/angular/universal/pull/938

cc/ @toxicable @CaerusKaru @vikerman

Versions 6&7 should be deprecated shortly, in the meantime you can also pin it to version 5 while the PR gets merged & published out for a newer fixed version

Hi Mark
great job, now it's run!

You can update now to ^ with beta.8 and higher it's been fixed, it was fixed via commit #578
@fra-ita

Hi, I have this same issue when building my app with VS, I get error:
The command "node node_modules/webpack/bin/webpack.js" exited with code 2.

and it's failing because:

"export 'ORIGIN_URL' was not found in '@nguniversal/aspnetcore-engine'
"export 'REQUEST' was not found in '@nguniversal/aspnetcore-engine'

I have run:

npm i @nguniversal/aspnetcore-engine
npm i @nguniversal/common

this changed aspnetcore-engine and common from version 5.0.0-beta.5 to version 5.0.0 but still getting the issue, I don't understand, it was working but starting with this issue suddenly, could you help me, please? I'm kind of desperate.

try 5.0.0-beta.8 (not 5.0.0)

It麓s not working :(

**[path here]**>npm list @nguniversal/aspnetcore-engine
[email protected] **[path here]**-- @nguniversal/[email protected]


**[path here]**>npm run build:dev

 [email protected] build:dev **[path here]**
 npm run build:vendor && npm run build:webpack


 [email protected] build:vendor **[path here]**
 webpack --config webpack.config.vendor.js --progress --color

env = undefined
[0] Hash: 67c850703e79d1fd1d588f33b7cdf91457103274
Version: webpack 3.11.0
Child
    Hash: 67c850703e79d1fd1d58
    Time: 11230ms
        Asset     Size  Chunks                    Chunk Names
    vendor.js  4.36 MB       0  [emitted]  [big]  vendor
Child
    Hash: 8f33b7cdf91457103274
    Time: 10578ms
        Asset     Size  Chunks                    Chunk Names
    vendor.js  4.33 MB       0  [emitted]  [big]  vendor

> [email protected] build:webpack **[path here]**
> webpack --progress --color

[1] Hash: 14fbf57a78c88df7d0c1c45234dfef8e46d378a0
Version: webpack 3.11.0
Child
    Hash: 14fbf57a78c88df7d0c1
    Time: 47424ms
                                     Asset      Size  Chunks                    Chunk Names
      674f50d287a8c48dc19ba404d20fe713.eot    166 kB          [emitted]
    af7ae505a9eed503f8b8e6982036873e.woff2   77.2 kB          [emitted]
     fee66e712a8a08eef5805a46892932ad.woff     98 kB          [emitted]
      b06871f281fee6b241d60582ae9369b9.ttf    166 kB          [emitted]
      912ec66d7572ff821749319396470bde.svg    444 kB          [emitted]  [big]
                                      0.js   7.94 kB       0  [emitted]
                            main-client.js   15.9 MB       1  [emitted]  [big]  main-client
                                  0.js.map  81 bytes       0  [emitted]
                        main-client.js.map   5.78 kB       1  [emitted]         main-client

    WARNING in ./ClientApp/app/shared/card.service.ts
    17:41-51 "export 'ORIGIN_URL' was not found in '@nguniversal/aspnetcore-engine'
     @ ./ClientApp/app/shared/card.service.ts
     @ ./ClientApp/app/app.module.ts
     @ ./ClientApp/app/app.module.browser.ts
     @ ./ClientApp/boot.browser.ts
     @ multi ./ClientApp/boot.browser.ts

    WARNING in ./ClientApp/app/shared/file.service.ts
    17:41-51 "export 'ORIGIN_URL' was not found in '@nguniversal/aspnetcore-engine'
     @ ./ClientApp/app/shared/file.service.ts
     @ ./ClientApp/app/app.module.ts
     @ ./ClientApp/app/app.module.browser.ts
     @ ./ClientApp/boot.browser.ts
     @ multi ./ClientApp/boot.browser.ts

    WARNING in ./ClientApp/app/shared/board.service.ts
    17:41-51 "export 'ORIGIN_URL' was not found in '@nguniversal/aspnetcore-engine'
     @ ./ClientApp/app/shared/board.service.ts
     @ ./ClientApp/app/app.module.ts
     @ ./ClientApp/app/app.module.browser.ts
     @ ./ClientApp/boot.browser.ts
     @ multi ./ClientApp/boot.browser.ts

    WARNING in ./ClientApp/app/shared/metric.service.ts
    17:41-51 "export 'ORIGIN_URL' was not found in '@nguniversal/aspnetcore-engine'
     @ ./ClientApp/app/shared/metric.service.ts
     @ ./ClientApp/app/app.module.ts
     @ ./ClientApp/app/app.module.browser.ts
     @ ./ClientApp/boot.browser.ts
     @ multi ./ClientApp/boot.browser.ts

    WARNING in ./ClientApp/app/shared/report.service.ts
    17:41-51 "export 'ORIGIN_URL' was not found in '@nguniversal/aspnetcore-engine'
     @ ./ClientApp/app/shared/report.service.ts
     @ ./ClientApp/app/app.module.ts
     @ ./ClientApp/app/app.module.browser.ts
     @ ./ClientApp/boot.browser.ts
     @ multi ./ClientApp/boot.browser.ts

    WARNING in ./ClientApp/app/shared/genericitem.service.ts
    17:41-51 "export 'ORIGIN_URL' was not found in '@nguniversal/aspnetcore-engine'
     @ ./ClientApp/app/shared/genericitem.service.ts
     @ ./ClientApp/app/app.module.ts
     @ ./ClientApp/app/app.module.browser.ts
     @ ./ClientApp/boot.browser.ts
     @ multi ./ClientApp/boot.browser.ts

    WARNING in ./ClientApp/app/shared/settings.service.ts
    17:41-51 "export 'ORIGIN_URL' was not found in '@nguniversal/aspnetcore-engine'
     @ ./ClientApp/app/shared/settings.service.ts
     @ ./ClientApp/app/app.module.ts
     @ ./ClientApp/app/app.module.browser.ts
     @ ./ClientApp/boot.browser.ts
     @ multi ./ClientApp/boot.browser.ts

    WARNING in ./ClientApp/app/app.component.ts
    30:41-48 "export 'REQUEST' was not found in '@nguniversal/aspnetcore-engine'
     @ ./ClientApp/app/app.component.ts
     @ ./ClientApp/app/app.module.browser.ts
     @ ./ClientApp/boot.browser.ts
     @ multi ./ClientApp/boot.browser.ts

    WARNING in ./ClientApp/app/app.module.browser.ts
    36:29-39 "export 'ORIGIN_URL' was not found in '@nguniversal/aspnetcore-engine'
     @ ./ClientApp/app/app.module.browser.ts
     @ ./ClientApp/boot.browser.ts
     @ multi ./ClientApp/boot.browser.ts

    WARNING in ./ClientApp/app/app.module.browser.ts
    40:29-36 "export 'REQUEST' was not found in '@nguniversal/aspnetcore-engine'
     @ ./ClientApp/app/app.module.browser.ts
     @ ./ClientApp/boot.browser.ts
     @ multi ./ClientApp/boot.browser.ts

    ERROR in [at-loader] ./ClientApp/app/app.component.ts:7:10
        TS2305: Module '"**[path here]**/node_modules/@nguniversal/aspnetcore-engine/aspnetcore-engine"' has no exported member 'REQUEST'.

    ERROR in [at-loader] ./ClientApp/app/app.module.browser.ts:6:10
        TS2305: Module '"**[path here]**/node_modules/@nguniversal/aspnetcore-engine/aspnetcore-engine"' has no exported member 'ORIGIN_URL'.

    ERROR in [at-loader] ./ClientApp/app/app.module.browser.ts:6:22
        TS2305: Module '"**[path here]**/node_modules/@nguniversal/aspnetcore-engine/aspnetcore-engine"' has no exported member 'REQUEST'.

    ERROR in [at-loader] ./ClientApp/app/app.module.ts:62:10
        TS2305: Module '"**[path here]**/node_modules/@nguniversal/aspnetcore-engine/aspnetcore-engine"' has no exported member 'ORIGIN_URL'.

    ERROR in [at-loader] ./ClientApp/app/shared/board.service.ts:5:10
        TS2305: Module '"**[path here]**/node_modules/@nguniversal/aspnetcore-engine/aspnetcore-engine"' has no exported member 'ORIGIN_URL'.

    ERROR in [at-loader] ./ClientApp/app/shared/card.service.ts:5:10
        TS2305: Module '"**[path here]**/node_modules/@nguniversal/aspnetcore-engine/aspnetcore-engine"' has no exported member 'ORIGIN_URL'.

    ERROR in [at-loader] ./ClientApp/app/shared/file.service.ts:3:10
        TS2305: Module '"**[path here]**/node_modules/@nguniversal/aspnetcore-engine/aspnetcore-engine"' has no exported member 'ORIGIN_URL'.

    ERROR in [at-loader] ./ClientApp/app/shared/genericitem.service.ts:5:10
        TS2305: Module '"**[path here]**/node_modules/@nguniversal/aspnetcore-engine/aspnetcore-engine"' has no exported member 'ORIGIN_URL'.

    ERROR in [at-loader] ./ClientApp/app/shared/metric.service.ts:5:10
        TS2305: Module '"**[path here]**/node_modules/@nguniversal/aspnetcore-engine/aspnetcore-engine"' has no exported member 'ORIGIN_URL'.

    ERROR in [at-loader] ./ClientApp/app/shared/report.service.ts:5:10
        TS2305: Module '"**[path here]**/node_modules/@nguniversal/aspnetcore-engine/aspnetcore-engine"' has no exported member 'ORIGIN_URL'.

    ERROR in [at-loader] ./ClientApp/app/shared/settings.service.ts:5:10
        TS2305: Module '"**[path here]**/node_modules/@nguniversal/aspnetcore-engine/aspnetcore-engine"' has no exported member 'ORIGIN_URL'.
Child
    Hash: c45234dfef8e46d378a0
    Time: 47486ms
                                     Asset     Size  Chunks                    Chunk Names
      674f50d287a8c48dc19ba404d20fe713.eot   166 kB          [emitted]
    af7ae505a9eed503f8b8e6982036873e.woff2  77.2 kB          [emitted]
     fee66e712a8a08eef5805a46892932ad.woff    98 kB          [emitted]
      b06871f281fee6b241d60582ae9369b9.ttf   166 kB          [emitted]
      912ec66d7572ff821749319396470bde.svg   444 kB          [emitted]  [big]
                                      0.js  7.94 kB       0  [emitted]
                            main-server.js  23.5 MB       1  [emitted]  [big]  main-server

    WARNING in ./ClientApp/app/shared/card.service.ts
    17:41-51 "export 'ORIGIN_URL' was not found in '@nguniversal/aspnetcore-engine'
     @ ./ClientApp/app/shared/card.service.ts
     @ ./ClientApp/app/app.module.ts
     @ ./ClientApp/app/app.module.server.ts
     @ ./ClientApp/boot.server.ts

    WARNING in ./ClientApp/app/shared/file.service.ts
    17:41-51 "export 'ORIGIN_URL' was not found in '@nguniversal/aspnetcore-engine'
     @ ./ClientApp/app/shared/file.service.ts
     @ ./ClientApp/app/app.module.ts
     @ ./ClientApp/app/app.module.server.ts
     @ ./ClientApp/boot.server.ts

    WARNING in ./ClientApp/app/shared/board.service.ts
    17:41-51 "export 'ORIGIN_URL' was not found in '@nguniversal/aspnetcore-engine'
     @ ./ClientApp/app/shared/board.service.ts
     @ ./ClientApp/app/app.module.ts
     @ ./ClientApp/app/app.module.server.ts
     @ ./ClientApp/boot.server.ts

    WARNING in ./ClientApp/app/shared/report.service.ts
    17:41-51 "export 'ORIGIN_URL' was not found in '@nguniversal/aspnetcore-engine'
     @ ./ClientApp/app/shared/report.service.ts
     @ ./ClientApp/app/app.module.ts
     @ ./ClientApp/app/app.module.server.ts
     @ ./ClientApp/boot.server.ts

    WARNING in ./ClientApp/app/shared/metric.service.ts
    17:41-51 "export 'ORIGIN_URL' was not found in '@nguniversal/aspnetcore-engine'
     @ ./ClientApp/app/shared/metric.service.ts
     @ ./ClientApp/app/app.module.ts
     @ ./ClientApp/app/app.module.server.ts
     @ ./ClientApp/boot.server.ts

    WARNING in ./ClientApp/app/shared/genericitem.service.ts
    17:41-51 "export 'ORIGIN_URL' was not found in '@nguniversal/aspnetcore-engine'
     @ ./ClientApp/app/shared/genericitem.service.ts
     @ ./ClientApp/app/app.module.ts
     @ ./ClientApp/app/app.module.server.ts
     @ ./ClientApp/boot.server.ts

    WARNING in ./ClientApp/app/shared/settings.service.ts
    17:41-51 "export 'ORIGIN_URL' was not found in '@nguniversal/aspnetcore-engine'
     @ ./ClientApp/app/shared/settings.service.ts
     @ ./ClientApp/app/app.module.ts
     @ ./ClientApp/app/app.module.server.ts
     @ ./ClientApp/boot.server.ts

    WARNING in ./ClientApp/app/app.component.ts
    30:41-48 "export 'REQUEST' was not found in '@nguniversal/aspnetcore-engine'
     @ ./ClientApp/app/app.component.ts
     @ ./ClientApp/app/app.module.server.ts
     @ ./ClientApp/boot.server.ts

    ERROR in [at-loader] ./ClientApp/app/app.component.ts:7:10
        TS2305: Module '"**[path here]**/node_modules/@nguniversal/aspnetcore-engine/aspnetcore-engine"' has no exported member 'REQUEST'.

    ERROR in [at-loader] ./ClientApp/app/app.module.browser.ts:6:10
        TS2305: Module '"**[path here]**/node_modules/@nguniversal/aspnetcore-engine/aspnetcore-engine"' has no exported member 'ORIGIN_URL'.

    ERROR in [at-loader] ./ClientApp/app/app.module.browser.ts:6:22
        TS2305: Module '"**[path here]**/node_modules/@nguniversal/aspnetcore-engine/aspnetcore-engine"' has no exported member 'REQUEST'.

    ERROR in [at-loader] ./ClientApp/app/app.module.ts:62:10
        TS2305: Module '"**[path here]**/node_modules/@nguniversal/aspnetcore-engine/aspnetcore-engine"' has no exported member 'ORIGIN_URL'.

    ERROR in [at-loader] ./ClientApp/app/shared/board.service.ts:5:10
        TS2305: Module '"**[path here]**/node_modules/@nguniversal/aspnetcore-engine/aspnetcore-engine"' has no exported member 'ORIGIN_URL'.

    ERROR in [at-loader] ./ClientApp/app/shared/card.service.ts:5:10
        TS2305: Module '"**[path here]**/node_modules/@nguniversal/aspnetcore-engine/aspnetcore-engine"' has no exported member 'ORIGIN_URL'.

    ERROR in [at-loader] ./ClientApp/app/shared/file.service.ts:3:10
        TS2305: Module '"**[path here]**/node_modules/@nguniversal/aspnetcore-engine/aspnetcore-engine"' has no exported member 'ORIGIN_URL'.

    ERROR in [at-loader] ./ClientApp/app/shared/genericitem.service.ts:5:10
        TS2305: Module '"**[path here]**/node_modules/@nguniversal/aspnetcore-engine/aspnetcore-engine"' has no exported member 'ORIGIN_URL'.

    ERROR in [at-loader] ./ClientApp/app/shared/metric.service.ts:5:10
        TS2305: Module '"**[path here]**/node_modules/@nguniversal/aspnetcore-engine/aspnetcore-engine"' has no exported member 'ORIGIN_URL'.

    ERROR in [at-loader] ./ClientApp/app/shared/report.service.ts:5:10
        TS2305: Module '"**[path here]**/node_modules/@nguniversal/aspnetcore-engine/aspnetcore-engine"' has no exported member 'ORIGIN_URL'.

    ERROR in [at-loader] ./ClientApp/app/shared/settings.service.ts:5:10
        TS2305: Module '"**[path here]**/node_modules/@nguniversal/aspnetcore-engine/aspnetcore-engine"' has no exported member 'ORIGIN_URL'.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] build:webpack: `webpack --progress --color`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] build:webpack script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!    **[path here]**\AppData\Roaming\npm-cache\_logs\2018-04-13T15_18_44_241Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] build:dev: `npm run build:vendor && npm run build:webpack`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] build:dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     **[path here]**\AppData\Roaming\npm-cache\_logs\2018-04-13T15_18_44_322Z-debug.log`

Take a look at the commit Mark mentions above. The import for tokens has changed, it鈥檚 now @nguniversal/aspnetcore-engine/tokens

Thanks a lot!, you saved my day, it works now.

Was this page helpful?
0 / 5 - 0 ratings