简体   繁体   English

您可能需要适当的加载程序来处理此文件-.net core和Angular

[英]You may need an appropriate loader to handle this file - .net core & Angular

I keep getting the following error web running a production build of a .net core angular 4 application. 我一直在运行.net核心angular 4应用程序的生产版本时收到以下错误Web。 Those are 2 node packages I installed and looks like their is some issue with webpack reading those files only for production builds. 这些是我安装的2个节点程序包,看起来它们是webpack仅在生产版本中读取那些文件的问题。 Any thoughts? 有什么想法吗?

ERROR in ./$$_gendir/~/ngx-mydatepicker/dist/ngx-my-date-picker.component.ngfactory.ts
  Module parse failed: d:\a\1\s\Vacant2\$$_gendir\node_modules\ngx-mydatepicker\dist\ngx-my-date-picker.component.ngfactory.ts Unexpected token (14:28)
  You may need an appropriate loader to handle this file type.
  | import * as i3 from 'ngx-mydatepicker/dist/directives/ngx-my-date-picker.focus.directive';
  | import * as i4 from 'ngx-mydatepicker/dist/services/ngx-my-date-picker.util.service';
  | const styles_NgxMyDatePicker:any[] = ['.ngxmdp .headertodaybtn,.ngxmdp .monthcell,.ngxmdp .weekdaytitle{overflow:hidden;white-space:nowrap}.ngxmdp *{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:Arial,Helvetica,sans-serif;padding:0;margin:0}.ngxmdp .selector{position:absolute;padding:0;border:1px solid #CCC;border-radius:4px;z-index:100000;animation:selectorfadein 60ms}.ngxmdp .selector:focus{border:1px solid #ADD8E6;outline:0}@keyframes selectorfadein{from{opacity:0}to{opacity:1}}.ngxmdp .selectorarrow{background:#FAFAFA;padding:0}.ngxmdp .selectorarrow:after,.ngxmdp .selectorarrow:before{bottom:100%;border:solid transparent;content:" ";height:0;width:0;position:absolute}.ngxmdp .selectorarrow:after{border-color:rgba(250,250,250,0);border-bottom-color:#FAFAFA;border-width:10px;margin-left:-10px}.ngxmdp .selectorarrow:before{border-color:rgba(204,204,204,0);border-bottom-color:#CCC;border-width:11px;margin-left:-11px}.ngxmdp .selectorarrow:focus:before{bord...
  | export const RenderType_NgxMyDatePicker:i0.RendererType2 = i0.ɵcrt({encapsulation:2,
  |     styles:styles_NgxMyDatePicker,data:{}});
   @ ./$$_gendir/ClientApp/app/app.module.server.ngfactory.ts 10:0-115
   @ ./ClientApp/boot.server.ts

  ERROR in ./$$_gendir/~/ngx-loading/ngx-loading.ngfactory.ts
  Module parse failed: d:\a\1\s\Vacant2\$$_gendir\node_modules\ngx-loading\ngx-loading.ngfactory.ts Unexpected token (12:35)
  You may need an appropriate loader to handle this file type.
  | import * as i1 from 'ngx-loading';
  | import * as i2 from '@angular/common';
  | export const LoadingModuleNgFactory:i0.NgModuleFactory<i1.LoadingModule> = i0.ɵcmf(i1.LoadingModule,
  |     ([] as any[]),(_l:any) => {
  |       return i0.ɵmod([i0.ɵmpd(512,i0.ComponentFactoryResolver,i0.ɵCodegenComponentFactoryResolver,
   @ ./$$_gendir/ClientApp/app/components/app/app.component.ngfactory.ts 9:0-94
   @ ./$$_gendir/ClientApp/app/app.module.server.ngfactory.ts
   @ ./ClientApp/boot.server.ts

I found the solution here https://github.com/aspnet/JavaScriptServices/issues/1168#issuecomment-320026397 我在这里找到解决方案https://github.com/aspnet/JavaScriptServices/issues/1168#issuecomment-320026397

Just needed to remove include: /ClientApp/ from myh webpack.config.js. 只需要从myh webpack.config.js中删除包括:/ ClientApp /。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 webpack错误:您可能需要适当的加载程序来处理此文件类型 - webpack error : You may need an appropriate loader to handle this file type 您可能需要适当的加载程序来处理此文件类型 - React You may need an appropriate loader to handle this file type Webpack:您可能需要适当的加载器来处理此文件类型 - Webpack: You may need an appropriate loader to handle this file type Angular您可能需要适当的加载程序错误 - Angular You may need an appropriate loader error Webpack 问题 - 您可能需要一个合适的加载器来处理此文件类型,目前没有配置加载器来处理此文件 - Webpack issue - You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file JSON 数据对 API 的跨源请求 - “您可能需要一个合适的加载器来处理这种文件类型。” - Cross-Origin Request to API for JSON data - “You may need an appropriate loader to handle this file type.” Webpack4 | Redux |反应问题-您可能需要适当的加载程序来处理此文件类型 - Webpack4|Redux|React Issue - You may need an appropriate loader to handle this file type npm模块解析失败…您可能需要适当的加载程序来处理此文件类型 - npm Module parse failed… You may need an appropriate loader to handle this file type Chart.js 错误:您可能需要适当的加载程序来处理此文件类型 - Chart.js Error: You may need an appropriate loader to handle this file type Reactjs & Express '您可能需要一个合适的加载器来处理这种文件类型。 - Reactjs & Express 'You may need an appropriate loader to handle this file type.'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM