我有一个使用asp.net core web api的angular4应用程序,使用visual studio 2017.整个coede正在构建和运行,没有任何问题 . 我从Visual Studio发布应用程序时出现问题 .

我使用adal-angular4进行身份验证,它使用\ node_modules子文件夹 . 这可能导致问题,我不是100%肯定 . 我的应用程序根目录中已经有一个'node_modules'文件夹 . node_modules有一个adal-angular4的子文件夹,它包含另一个node_modules文件夹(项目数少于原始node_modules文件夹)

文件夹结构:

C:\csm_final\CSM\                  
               \node_modules\
                            \@angular\
                            \adal-angular\
                            \adal-angular4\
                                            \node_modules\
                                                          \@angular\
                                                            \zone.js\
             \ClientApp\
                        \app\
                            \components\                            


        Complete list of publish output : 
        ====================

        1>------ Publish started: Project: CSM, Configuration: Release Any CPU ------
        Connecting to C:\csm_final\CSM\bin\Release\PublishOutput...
        >>>>>>>>>>>>

        up to date in 7.942s
        node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js --env.prod
        Hash: 293a4183c5f14de4e4a1d948853634f41eb1e059
        Version: webpack 2.5.1
        Child
            Hash: 293a4183c5f14de4e4a1
            Time: 20814ms
                                           Asset     Size  Chunks                    Chunk Names
            674f50d287a8c48dc19ba404d20fe713.eot   166 kB          [emitted]         
            912ec66d7572ff821749319396470bde.svg   444 kB          [emitted]  [big]  
            b06871f281fee6b241d60582ae9369b9.ttf   166 kB          [emitted]         
            89889688147bd7575d6327160d64e760.svg   109 kB          [emitted]         
                                       vendor.js  1.49 MB       0  [emitted]  [big]  vendor
                                      vendor.css   917 kB       0  [emitted]  [big]  vendor
        Child
            Hash: d948853634f41eb1e059
            Time: 20854ms
                                           Asset     Size  Chunks                    Chunk Names
            89889688147bd7575d6327160d64e760.svg   109 kB          [emitted]         
            674f50d287a8c48dc19ba404d20fe713.eot   166 kB          [emitted]         
            912ec66d7572ff821749319396470bde.svg   444 kB          [emitted]  [big]  
            b06871f281fee6b241d60582ae9369b9.ttf   166 kB          [emitted]         
                                       vendor.js  5.91 MB       0  [emitted]  [big]  vendor
        node node_modules/webpack/bin/webpack.js --env.prod
        Hash: 5b3b395aa698822a7db597454826de55f91d5803
        Version: webpack 2.5.1
        Child
            Hash: 5b3b395aa698822a7db5
            Time: 5264ms
                     Asset    Size  Chunks             Chunk Names
            main-client.js  115 kB       0  [emitted]  main-client

            ****ERROR in Error encountered resolving symbol values statically. Calling function '╔╡makeDecorator', function calls are not supported**. Consider replacing the function or lambda with a reference to an exported function, resolving symbol Injectable in C:/csm_final/CSM/node_modules/adal-angular4/node_modules/@angular/core/core.d.ts, resolving symbol ╔╡e in C:/csm_final/CSM/node_modules/adal-angular4/node_modules/@angular/core/core.d.ts, resolving symbol ╔╡e in C:/csm_final/CSM/node_modules/adal-angular4/node_modules/@angular/core/core.d.ts**

            ERROR in ./ClientApp/boot.browser.ts
        Module not found(0,0): Error : Can't resolve './../$$_gendir/ClientApp/app/app.browser.module.ngfactory' in 'C:\csm_final\CSM\ClientApp'
             @ ./ClientApp/boot.browser.ts 6:0-95
        Child
            Hash: 97454826de55f91d5803
            Time: 5337ms
                     Asset     Size  Chunks                    Chunk Names
            main-server.js  1.81 MB       0  [emitted]  [big]  main-server

            ERROR in Error encountered resolving symbol values statically. Calling function '╔╡makeDecorator', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol Injectable in C:/csm_final/CSM/node_modules/adal-angular4/node_modules/@angular/core/core.d.ts, resolving symbol ╔╡e in C:/csm_final/CSM/node_modules/adal-angular4/node_modules/@angular/core/core.d.ts, resolving symbol ╔╡e in C:/csm_final/CSM/node_modules/adal-angular4/node_modules/@angular/core/core.d.ts

            ERROR in ./ClientApp/boot.server.ts
        Module not found(0,0): Error : Can't resolve './../$$_gendir/ClientApp/app/app.server.module.ngfactory' in 'C:\csm_final\CSM\ClientApp'
             @ ./ClientApp/boot.server.ts 8:0-94
        C:\csm_final\CSM\CSM.csproj(135,5): Error MSB3073: The command "node node_modules/webpack/bin/webpack.js --env.prod" exited with code 2.

        1>Publish failed due to build errors. Check the error list for more details.
        ========== Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
        ========== Publish: 0 succeeded, 1 failed, 0 skipped ==========

Actual Err :

ERROR in Error遇到静态解析符号值 . 调用函数'╔╡makeDecorator',不支持函数调用 . 考虑使用对导出函数的引用替换函数或lambda,在C:/ csm_final / CSM / node_modules / adal-angular4/node_modules/@angular/core/core.d.ts中解析符号Injectable,解析符号╔╡ein C:/csm_final/CSM/node_modules/adal-angular4/node_modules/@angular/core/core.d.ts,在C中解析符号:e:/ csm_final / CSM / node_modules / adal-angular4 / node_modules / @ angular /核心/ core.d.ts *