Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 9警告类型脚本.js_Angular_Typescript_Ecmascript 6_Single Page Application_Angular9 - Fatal编程技术网

Angular 9警告类型脚本.js

Angular 9警告类型脚本.js,angular,typescript,ecmascript-6,single-page-application,angular9,Angular,Typescript,Ecmascript 6,Single Page Application,Angular9,启动应用程序后,我收到警告 WARNING in ./node_modules/typescript/lib/typescript.js 5123:41-60 Critical dependency: the request of a dependency is an expression 尝试更改webpack.dev.config.js new webpack.ContextReplacementPlugin( /angular(\\|\/)core(\\|\/)(

启动应用程序后,我收到警告

WARNING in ./node_modules/typescript/lib/typescript.js 5123:41-60
Critical dependency: the request of a dependency is an expression

尝试更改webpack.dev.config.js

new webpack.ContextReplacementPlugin(
            /angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/,
            path.resolve(__dirname, 'doesnotexist/')
)
或者至少

new webpack.ContextReplacementPlugin( /(.+)?angular(\\|\/)core(.+)?/, root('./src'), {} )

这是一个空白项目,还是您只是从以前的版本升级到angular 9?我将我的应用程序升级到angular 9。您是否可以尝试运行ng build--verbose查看完整的错误登录I使用angular CLI。也许有一种方法可以引入angular.json?不确定angular.json。尝试在angular.json的build/options下添加键:
“preserveSymlinks”:true