Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/441.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
Javascript 带docker的角度构建在没有docker的情况下工作正常时会出现错误_Javascript_Angular_Docker_Nginx_Angularbuild - Fatal编程技术网

Javascript 带docker的角度构建在没有docker的情况下工作正常时会出现错误

Javascript 带docker的角度构建在没有docker的情况下工作正常时会出现错误,javascript,angular,docker,nginx,angularbuild,Javascript,Angular,Docker,Nginx,Angularbuild,我正在为Angular应用程序创建docker容器。当build命令从Dockerfile激发时,它会生成以下错误。但是,如果我在生成构建时没有Dockerfile,它就可以完美地工作。nodeJS的版本也一样 ERROR in node_modules/@types/node/base.d.ts(6139,5): error TS2300: Duplicate identifier 'mod'. src/app.e2e-spec.ts(3,1): error TS2593: Cannot f

我正在为Angular应用程序创建docker容器。当build命令从Dockerfile激发时,它会生成以下错误。但是,如果我在生成构建时没有Dockerfile,它就可以完美地工作。nodeJS的版本也一样


ERROR in node_modules/@types/node/base.d.ts(6139,5): error TS2300: Duplicate identifier 'mod'.
src/app.e2e-spec.ts(3,1): error TS2593: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
src/app.e2e-spec.ts(6,3): error TS2304: Cannot find name 'beforeEach'.
src/app.e2e-spec.ts(10,3): error TS2593: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
src/app.e2e-spec.ts(12,5): error TS2304: Cannot find name 'expect'.
node_modules/@types/requirejs/index.d.ts(38,14): error TS2300: Duplicate identifier 'mod'.
node_modules/@types/requirejs/index.d.ts(422,13): error TS2403: Subsequent variable declarations must have the same type.  Variable 'require' must be of type 'NodeRequire', but here has type 'Require'.
node_modules/ng2-select2/ng2-select2.component.d.ts(12,14): error TS2304: Cannot find name 'Select2Options'.
这是我的文件

FROM node:12 AS mean

RUN mkdir -p /app

WORKDIR /app
  
COPY package*.json /app/

RUN rm -rf package-lock.json

RUN npm install 

RUN npm install @angular/cli@8.0.6 -g

RUN apt-get update

COPY e2e/. /app
COPY src/. /app
COPY angular.json /app
COPY favicon-2.ico /app
COPY schema.js /app
COPY tsconfig.json /app
COPY tslint.json /app
COPY webpack.config.js /app

COPY . .

RUN node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng build --prod

# stage 2

FROM nginx:alpine

COPY --from=mean /app/dist/angular-bootstrap-md-app /usr/share/nginx/html

RUN rm /etc/nginx/conf.d/default.conf

COPY nginx.conf /etc/nginx/conf.d/default.conf

EXPOSE 80 443
请帮忙