42%生成274/275模块1活动...\src\index.js??已提取!d:\clients\app\node_modules\sass-loader\lib\loader.js??ref--15-3!d:\src\styles.scss<---最后几个GC---->
[12996:000002DFC57D42F0]43111 ms:清除1335.4(1425.0)->1335.3(1426.0)MB,2.6/0.0ms(平均mu=0.169,当前mu=0.100)分配失败[12996:000002DFC57D42F0]43489ms:标记-清除1336.2(1426.0)->1335.4(1425.5)MB,375.8/0.0ms(平均mu=0.144,当前mu=0.100)分配失败清除可能不会成功
<----JS StackTrace---->
=====JS栈迹==========================================================================
0: ExitFrame [pc: 00000257D3FDC5C1] Security context: 0x00b77541e6e9 <JSObject>
1: createNode [000001A31ED4EFF1] [D:\Clients\app\node_modules\typescript\lib\typescript.js:~16489]
[PC=00000257D55AD889](this=0x02B823CEDF89,kind=275,pos=-=-1,end=-1)2:createPropertyAssignment[000001A31ED54669][d:\clients\app\node_module\typescript\lib\typescri...
致命错误:无效标记-压缩堆限制分配失败-JavaScript堆内存不足1:00007FF76C26DD8A v8::internal::gcidletimehandler::gcidletimehandler+4506 2:00007FF76C248886 node::makeCallback+4534 3:00007FF76C249200 node_module_register+2032 4:00007FF76C5630DE v8::internal::fatalprocessoutofmemory+846 5:00007FF76C56300F v8::internal::fatalprocessoutofmemory+639
我尝试过这个解决方案:https://github.com/angular/Angulal-CLI/issues/5618#issueComment-450151214
即。
package.json
"scripts": {
"ng": "ng",
"ng-high-memory": "node --max_old_space_size=8000 ./node_modules/@angular/cli/bin/ng",// here
"start": "ng serve",
"build:prod": "ng build --configuration=prod",
},
在那之后
npm运行NG-high-memory--build--prod
但上面写着
> > metronic-angular@6.0.0 ng-high-memory D:\Clients\app
> > node --max_old_space_size=8000 ./node_modules/@angular/cli/bin/ng
>
> Available Commands: add Adds support for an external library to your
> project. analytics Configures the gathering of Angular CLI usage
> metrics. See https://v8.angular.io/cli/usage-analytics-gathering.
> build (b) Compiles an Angular app into an output directory named dist/
> at the given output path. Must be executed from within a workspace
> directory. deploy (d) Invokes the deploy builder for a specified
> project or for the default project in the workspace. config
> Retrieves or sets Angular configuration values in the angular.json
> file for the workspace. doc (d) Opens the official Angular
> documentation (angular.io) in a browser, and searches for a given
> keyword. e2e (e) Builds and serves an Angular app, then runs
> end-to-end tests using Protractor. generate (g) Generates and/or
> modifies files based on a schematic. help Lists available commands
> and their short descriptions. lint (l) Runs linting tools on Angular
> app code in a given project folder. new (n) Creates a new workspace
> and an initial Angular app. run Runs an Architect target with an
> optional custom builder configuration defined in your project. serve
> (s) Builds and serves your app, rebuilding on file changes. test (t)
> Runs unit tests in a project. update Updates your application and
> its dependencies. See https://update.angular.io/ version (v) Outputs
> Angular CLI version. xi18n Extracts i18n messages from source code.
>
> For more detailed help run "ng [command name] --help"
那么如何才能正确运行这个命令呢?
注意:我使用最新的Angular,即“@Angular/Core”:“^8.2.14”
和“@Angular/CLI”:“^8.3.19”
,
在我的raspbarry pi model 3上,RAM(1GB)和交换空间(1GB)太小了。将交换空间增加到10GB后,建议的命令“ng-high-memory”起作用了!
将节点js版本升级到v12。
这对我有用:
我已更新到最新的Angular版本,如下所示:ng update@Angular/cli@^8@Angular/core@^8
然后
package.json
"scripts": {
"ng-high-memory": "node --max_old_space_size=8000 ./node_modules/@angular/cli/bin/ng build --configuration=prod",
}
之后:
npm run ng-high-memory
URL:JavaScript堆内存不足
我还试图解决这里建议的问题,如何修复“致命错误:无效标记-压缩接近堆限制分配失败-JavaScript堆出内存”错误,但对我来说不起作用 这是我的package.json
当我试图执行 我得到如下所示的错误。为了克服这个问题,我执行了
错误:致命错误:无效标记-压缩接近堆限制分配失败-JavaScript堆内存不足 我们无法解决此错误。帮助我们解决如何增加javascript堆内存的问题
当我使用命令运行一个ionic3项目时,我会得到以下错误:
我写了一个棱角分明的应用程序,供自己使用。我想在我的Rasperry PI3+上运行它。该应用程序运行在我的Linux Mint19.3环境中,不存在任何问题。但在Rasppery上我确实会出错。当我运行代码时,以下内容适用: 10%构建3/3模块0活动ℹ的equwds.:Project正在运行于http://localhost:4200/webpack-dev-server/ℹ的equwds@:
我有一个ReactJS/Typescript项目,运行在Windows10上。我试图用ts脚本构建 完整错误信息 最后几个GC