我试图在Windows 10上构建angular2,但是在启动<?php
$startTime = strtotime($_POST['scheduleDate']);
include_once('../../classes/scheduler.php');
if(is_int($startTime)){
$var = new scheduler; //SENT TO classes/scheduler.php
$jsonArray = $var->getSchedule($startTime);
}else{
echo "DATA WASNT AN INT";
};?>
之后,构建会冻结。构建将我的终端冻结到ctrl-c不起作用的地步,我必须关闭终端(或任务管理器中的kill节点)结束它。
运行!build.js.cjs
也会冻结,因此问题可能出在西兰花任务中。
我尝试了多个版本的节点,但我没有取得任何进展。
gulp broccoli.js.dev
答案 0 :(得分:0)
<强>更新强>
不适用于最近的Angular2版本,因为构建过程发生了很大变化
<强>原始强>
我创建了一个Dockerfile来构建可能有所帮助的Angular2(需要在Windows上运行VM)
FROM google/debian:jessie
MAINTAINER Günter Zöchbauer <gunter@gzoechbauer.com>
RUN echo "deb http://ftp.de.debian.org/debian/ jessie main non-free contrib" >> /etc/apt/sources.list
RUN \
apt-get -q update && \
DEBIAN_FRONTEND=noninteractive && \
apt-get install --no-install-recommends -y -q \
curl \
git \
git-core \
# npm \ 1.4.21 but requires >= 3.5.3 < 4.0.0
# nodejs \ 0.10.29 but requires >=5.4.1 < 6.0.0
apt-transport-https \
ca-certificates \
make \
build-essential \
g++ && \
apt-get upgrade -y
RUN \
curl -sL https://deb.nodesource.com/setup_5.x | bash - && \
apt-get install -y nodejs
RUN \
sh -c 'curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -' && \
# Set up the location of the stable repository.
sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list' && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive && \
apt-get install --no-install-recommends -y -q \
dart/stable
ENV DART_SDK /usr/lib/dart
ENV PATH $DART_SDK/bin:$PATH
RUN git clone --recursive https://github.com/angular/angular.git
WORKDIR /angular
RUN \
npm install bower -g && \
npm install tsd -g
RUN \
npm install && \
bower --allow-root install && \
cd tools && npm install && tsd install && \
cd ../modules/angular2 && npm install && tsd install
RUN node --max-old-space-size=4096 $(npm bin)/gulp build