我正在尝试创建react-boilerplate,但出现了以下错误。
npm ERR! Maximum call stack size exceeded
npm ERR! A complete log of this run can be found in:
npm ERR! /home/dev1/.npm/_logs/2019-02-05T10_12_55_340Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-boilerplate@3.7.0 presetup: `npm i chalk shelljs`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-boilerplate@3.7.0 presetup script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/dev1/.npm/_logs/2019-02-05T10_12_55_434Z-debug.log
节点版本:v8.9.4
我已从git克隆安装程序并运行npm run setup
命令,但收到此错误。
注意:
remove node_modues and re-install node_modules
-不起作用
uninstall node globaly and re-install node
-不起作用
有人可以帮忙吗?
答案 0 :(得分:1)
我花了几个小时来解决这个问题。以下解决方案对我有用
rm -rf node_modules
npm cache clean --f
npm install
答案 1 :(得分:0)
在这种情况下,您需要手动/明确分配调用堆栈,以便增加调用堆栈的大小来执行该操作。您可以尝试:
set.seed(123)
data<- data.frame(cbind(runif(10000,-180,180), runif(10000,-90,90)), replicate(1200, runif(10000,0,150)))
coords<-data[,1:2]
names(coords)<-c("lon","lat")
data_t<- as.data.frame(t(data[,3:1202]))
data_t$month<-rep(seq(1,12,1),100)
library(foreach)
library(doParallel)
cores=detectCores()
cl <- makeCluster(cores[1]-1) #take all the cores minus 1
registerDoParallel(cl)
mk_out<- foreach(m=1:12, .combine = rbind) %dopar% {
data_m<-data_t[which(data_t$month==m),]
library(trend)
mk_out_temp <- do.call(rbind,lapply(data_m[1:100],function(x)unlist(mk.test(x))))
mk_out_temp <-cbind(coords,mk_out_temp,rep(m,dim(coords)[1]))
mk_out_temp
}
stopCluster(cl)
head(mk_out)
head(mk_out)
lon lat data.name p.value statistic.z null.value.S parameter.n estimates.S estimates.varS
1 -76.47209 -34.09350 x 0.577590398263635 -0.556907839290681 0 100 -188 112750
2 103.78985 -31.58639 x 0.644362383361713 0.461608102085858 0 100 156 112750
3 -32.76831 66.64575 x 0.117932376736468 1.56351131351662 0 100 526 112750
4 137.88627 -30.83872 x 0.79096910003836 0.265052394100912 0 100 90 112750
5 158.56822 -67.37378 x 0.0959591933285242 -1.66476728429674 0 100 -560 112750
6 -163.59966 -25.88014 x 0.823256299016955 0.223358759073802 0 100 76 112750
estimates.tau alternative method pvalg rep(m, dim(coords)[1])
1 -0.037979797979798 two.sided Mann-Kendall trend test 0.577590398263635 1
2 0.0315151515151515 two.sided Mann-Kendall trend test 0.644362383361713 1
3 0.106262626262626 two.sided Mann-Kendall trend test 0.117932376736468 1
4 0.0181818181818182 two.sided Mann-Kendall trend test 0.79096910003836 1
5 -0.113131313131313 two.sided Mann-Kendall trend test 0.0959591933285242 1
6 0.0153535353535354 two.sided Mann-Kendall trend test 0.823256299016955 1
由于您正在执行typedef struct label{
char *line;
}label;
void save_line(label text){
printf("Write your name\n");
char *helper=malloc(30 * sizeof *helper);
scanf("%s", helper);
strcpy(text.line, helper);
}
void main(){
label text;
save_line(text);
printf("%s", text.line);
}
,因此需要在node --stack-size=16000 <file>
的{{1}}脚本中基本上更改该调用堆栈的值,例如:
npm run setup
如果仍然给出堆栈大小错误,则尝试使用setup
以外的更大值
答案 2 :(得分:0)
我检查了npm日志,发现安装@ xtuc / ieee754失败 我找到了此解决方案https://github.com/angular/angular-cli/issues/12231
您可能必须删除〜/ .npmrc文件。
我尝试了这个,它为我解决了这个问题。
希望这会有所帮助!
这个问题只浪费了我6个小时:(