代码之家  ›  专栏  ›  技术社区  ›  Brian Lacy

Aurelia UX Showcase应用程序加载失败

  •  1
  • Brian Lacy  · 技术社区  · 6 年前

    我很难让Aurelia UX Showcase应用程序在我的本地电脑上运行。它目前似乎无法在 hosted demo 网站也是,但我不确定这是否相关。我怎样才能成功地运行这个?这是应用程序中的错误,还是我做错了什么?

    我按照说明构建了Aurelia UX演示应用程序(位于 https://github.com/aurelia/app-ux-showcase ,并且该应用程序似乎构建成功。但是,在运行它时,服务器输出中会产生几个错误。

    我可以浏览应用程序(在 http://localhost:8080 )浏览器似乎连接到服务器。但是,没有回应。

    下面是服务器输出,运行 au run --env dev 命令:

    C:\src\aurelia-ux-showcase>au run --env dev
    Starting 'configureEnvironment'...
    Finished 'configureEnvironment'
    Starting 'runWebpack'...
    (node:14072) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
    Project is running at http://localhost:8080
    webpack output is served from /
    Content not from webpack is served from C:\src\aurelia-ux-showcase\dist
    404s will fallback to /index.html
    Finished 'runWebpack'
    Hash: 8541226efa5bac91e63a
    Version: webpack 4.8.3
    Time: 5594ms
    Built at: 2018-05-22 13:15:17
                                   Asset       Size   Chunks                    Chunk Names
    2cdebc25fc6d3d42442e69826e81a2c9.png   10.5 KiB           [emitted]
                                 main.js    701 KiB     main  [emitted]  [big]  main
                              vendors.js   3.88 MiB  vendors  [emitted]  [big]  vendors
                              index.html  743 bytes           [emitted]
    Entrypoint main [big] = vendors.js main.js
    [./node_modules/aurelia-bootstrapper/dist/native-modules/aurelia-bootstrapper.js] 5.17 KiB {vendors} [built]
    [./node_modules/aurelia-loader-webpack/dist/native-modules/aurelia-loader-webpack.js] 14.4 KiB {vendors} [built]
    [./node_modules/aurelia-loader/dist/native-modules/aurelia-loader.js] 4.19 KiB {vendors} [built]
    [./node_modules/aurelia-logging/dist/native-modules/aurelia-logging.js] 3.4 KiB {vendors} [built]
    [./node_modules/aurelia-pal/dist/native-modules/aurelia-pal.js] 2.18 KiB {vendors} [built]
    [./node_modules/aurelia-polyfills/dist/native-modules/aurelia-polyfills.js] 24.4 KiB {vendors} [built]
    [./node_modules/aurelia-templating/dist/native-modules/aurelia-templating.js] 145 KiB {vendors} [built]
    [./node_modules/aurelia-webpack-plugin/runtime/empty-entry.js] 585 bytes {vendors} [built]
    [./node_modules/aurelia-webpack-plugin/runtime/pal-loader-entry.js] 1.56 KiB {vendors} [built]
    [./node_modules/bluebird/js/browser/bluebird.js] 175 KiB {vendors} [built]
    [0] multi aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry aurelia-bootstrapper 52 bytes {main} [built]
    [./node_modules/process/browser.js] 5.29 KiB {vendors} [built]
    [aurelia-framework] ./node_modules/aurelia-framework/dist/native-modules/aurelia-framework.js 13.8 KiB {vendors} [built]
    [aurelia-pal-browser] ./node_modules/aurelia-pal-browser/dist/native-modules/aurelia-pal-browser.js 14.2 KiB {vendors} [built]
    [main] ./src/main.ts 966 bytes {main} [built]
        + 172 hidden modules
    
    ERROR in ./node_modules/@aurelia-ux/components/dist/native-modules/index.js
    Module not found: Error: Can't resolve '@aurelia-ux/button' in 'C:\src\aurelia-ux-showcase\node_modules\@aurelia-ux\components\dist\native-modules'
     @ ./node_modules/@aurelia-ux/components/dist/native-modules/index.js 2:0-51 2:0-51 15:0-75 30:4-28
     @ ./src/main.ts
     @ ./node_modules/aurelia-webpack-plugin/runtime/empty-entry.js
     @ multi aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry aurelia-bootstrapper
    
    ERROR in ./node_modules/@aurelia-ux/components/dist/native-modules/index.js
    Module not found: Error: Can't resolve '@aurelia-ux/checkbox' in 'C:\src\aurelia-ux-showcase\node_modules\@aurelia-ux\components\dist\native-modules'
     @ ./node_modules/@aurelia-ux/components/dist/native-modules/index.js 3:0-67 3:0-67 3:0-67 17:0-79 32:4-30
     @ ./src/main.ts
     @ ./node_modules/aurelia-webpack-plugin/runtime/empty-entry.js
     @ multi aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry aurelia-bootstrapper
    
    ERROR in ./node_modules/@aurelia-ux/components/dist/native-modules/index.js
    Module not found: Error: Can't resolve '@aurelia-ux/chip-input' in 'C:\src\aurelia-ux-showcase\node_modules\@aurelia-ux\components\dist\native-modules'
     @ ./node_modules/@aurelia-ux/components/dist/native-modules/index.js 4:0-83 4:0-83 4:0-83 4:0-83 18:0-77 33:4-26
     @ ./src/main.ts
     @ ./node_modules/aurelia-webpack-plugin/runtime/empty-entry.js
     @ multi aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry aurelia-bootstrapper
    
    ERROR in ./node_modules/@aurelia-ux/components/dist/native-modules/index.js
    Module not found: Error: Can't resolve '@aurelia-ux/datepicker' in 'C:\src\aurelia-ux-showcase\node_modules\@aurelia-ux\components\dist\native-modules'
     @ ./node_modules/@aurelia-ux/components/dist/native-modules/index.js 6:0-59 6:0-59 19:0-83 34:4-32
     @ ./src/main.ts
     @ ./node_modules/aurelia-webpack-plugin/runtime/empty-entry.js
     @ multi aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry aurelia-bootstrapper
    
    ERROR in ./node_modules/@aurelia-ux/components/dist/native-modules/index.js
    Module not found: Error: Can't resolve '@aurelia-ux/form' in 'C:\src\aurelia-ux-showcase\node_modules\@aurelia-ux\components\dist\native-modules'
     @ ./node_modules/@aurelia-ux/components/dist/native-modules/index.js 7:0-47 7:0-47 21:0-71 36:4-26
     @ ./src/main.ts
     @ ./node_modules/aurelia-webpack-plugin/runtime/empty-entry.js
     @ multi aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry aurelia-bootstrapper
    
    ERROR in ./node_modules/@aurelia-ux/components/dist/native-modules/index.js
    Module not found: Error: Can't resolve '@aurelia-ux/input' in 'C:\src\aurelia-ux-showcase\node_modules\@aurelia-ux\components\dist\native-modules'
     @ ./node_modules/@aurelia-ux/components/dist/native-modules/index.js 8:0-58 8:0-58 8:0-58 22:0-73 37:4-27
     @ ./src/main.ts
     @ ./node_modules/aurelia-webpack-plugin/runtime/empty-entry.js
     @ multi aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry aurelia-bootstrapper
    
    ERROR in ./node_modules/@aurelia-ux/components/dist/native-modules/index.js
    Module not found: Error: Can't resolve '@aurelia-ux/input-info' in 'C:\src\aurelia-ux-showcase\node_modules\@aurelia-ux\components\dist\native-modules'
     @ ./node_modules/@aurelia-ux/components/dist/native-modules/index.js 9:0-58 9:0-58 23:0-82 38:4-31
     @ ./src/main.ts
     @ ./node_modules/aurelia-webpack-plugin/runtime/empty-entry.js
     @ multi aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry aurelia-bootstrapper
    
    ERROR in ./node_modules/@aurelia-ux/components/dist/native-modules/index.js
    Module not found: Error: Can't resolve '@aurelia-ux/list' in 'C:\src\aurelia-ux-showcase\node_modules\@aurelia-ux\components\dist\native-modules'
     @ ./node_modules/@aurelia-ux/components/dist/native-modules/index.js 10:0-47 10:0-47 24:0-71 39:4-26
     @ ./src/main.ts
     @ ./node_modules/aurelia-webpack-plugin/runtime/empty-entry.js
     @ multi aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry aurelia-bootstrapper
    
    ERROR in ./node_modules/@aurelia-ux/components/dist/native-modules/index.js
    Module not found: Error: Can't resolve '@aurelia-ux/radio' in 'C:\src\aurelia-ux-showcase\node_modules\@aurelia-ux\components\dist\native-modules'
     @ ./node_modules/@aurelia-ux/components/dist/native-modules/index.js 11:0-58 11:0-58 11:0-58 25:0-73 40:4-27
     @ ./src/main.ts
     @ ./node_modules/aurelia-webpack-plugin/runtime/empty-entry.js
     @ multi aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry aurelia-bootstrapper
    
    ERROR in ./node_modules/@aurelia-ux/components/dist/native-modules/index.js
    Module not found: Error: Can't resolve '@aurelia-ux/switch' in 'C:\src\aurelia-ux-showcase\node_modules\@aurelia-ux\components\dist\native-modules'
     @ ./node_modules/@aurelia-ux/components/dist/native-modules/index.js 13:0-61 13:0-61 13:0-61 27:0-75 42:4-28
     @ ./src/main.ts
     @ ./node_modules/aurelia-webpack-plugin/runtime/empty-entry.js
     @ multi aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry aurelia-bootstrapper
    
    ERROR in ./node_modules/@aurelia-ux/components/dist/native-modules/index.js
    Module not found: Error: Can't resolve '@aurelia-ux/textarea' in 'C:\src\aurelia-ux-showcase\node_modules\@aurelia-ux\components\dist\native-modules'
     @ ./node_modules/@aurelia-ux/components/dist/native-modules/index.js 12:0-67 12:0-67 12:0-67 26:0-79 41:4-30
     @ ./src/main.ts
     @ ./node_modules/aurelia-webpack-plugin/runtime/empty-entry.js
     @ multi aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry aurelia-bootstrapper
    Child html-webpack-plugin for "index.html":
             Asset      Size  Chunks  Chunk Names
        index.html  1.36 MiB       0
        Entrypoint undefined = index.html
        [./node_modules/html-webpack-plugin/lib/loader.js!./index.ejs] 1.1 KiB {0} [built]
        [./node_modules/lodash/lodash.js] 527 KiB {0} [built]
        [./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 509 bytes {0} [built]
        [./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 519 bytes {0} [built]
    i ï½¢wdmï½£: wait until bundle finished: /vendors.js
    i ï½¢wdmï½£: wait until bundle finished: /main.js
    i ï½¢wdmï½£: wait until bundle finished: /
    × 「wdm」: ConcurrentCompilationError: You ran Webpack twice. Each instance only supports a single concurrent compilation at a time.
        at Compiler.run (C:\src\aurelia-ux-showcase\node_modules\webpack\lib\Compiler.js:151:37)
        at rebuild (C:\src\aurelia-ux-showcase\node_modules\webpack-dev-server\node_modules\webpack-dev-middleware\lib\context.js:81:24)
        at done (C:\src\aurelia-ux-showcase\node_modules\webpack-dev-server\node_modules\webpack-dev-middleware\lib\context.js:59:7)
        at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\src\aurelia-ux-showcase\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:24:12), <anonymous>:18:1)
        at AsyncSeriesHook.lazyCompileHook [as _callAsync] (C:\src\aurelia-ux-showcase\node_modules\webpack\node_modules\tapable\lib\Hook.js:35:21)
        at emitRecords.err (C:\src\aurelia-ux-showcase\node_modules\webpack\lib\Compiler.js:203:22)
        at Compiler.emitRecords (C:\src\aurelia-ux-showcase\node_modules\webpack\lib\Compiler.js:315:39)
        at emitAssets.err (C:\src\aurelia-ux-showcase\node_modules\webpack\lib\Compiler.js:197:10)
        at hooks.afterEmit.callAsync.err (C:\src\aurelia-ux-showcase\node_modules\webpack\lib\Compiler.js:301:14)
        at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\src\aurelia-ux-showcase\node_modules\webpack\node_modules\tapable\lib\HookCodeFactory.js:24:12), <anonymous>:15:1)
        at AsyncSeriesHook.lazyCompileHook [as _callAsync] (C:\src\aurelia-ux-showcase\node_modules\webpack\node_modules\tapable\lib\Hook.js:35:21)
        at asyncLib.forEach.err (C:\src\aurelia-ux-showcase\node_modules\webpack\lib\Compiler.js:298:27)
        at done (C:\src\aurelia-ux-showcase\node_modules\neo-async\async.js:2854:11)
        at C:\src\aurelia-ux-showcase\node_modules\neo-async\async.js:2805:7
        at MemoryFileSystem.writeFile (C:\src\aurelia-ux-showcase\node_modules\memory-fs\lib\MemoryFileSystem.js:328:9)
        at writeOut (C:\src\aurelia-ux-showcase\node_modules\webpack\lib\Compiler.js:284:29)
    
    1 回复  |  直到 6 年前
        1
  •  4
  •   Seri    6 年前

    将命令更改为 au run --watch .

    在默认情况下,它应该使用dev环境运行,并且在运行应用程序而不使用 --watch 旗帜。

    编辑

    另外,尝试安装与纱线的依赖关系, npm install 但是,目前似乎没有正确安装软件包 yarn install 似乎工作得很好。

    npm install yarn

    纱线安装

    推荐文章