我已经使用ng更新
工具将Angular项目从8升级到9。本地(Windows)一切正常,但是当我试图在docker中构建项目时,我得到以下错误:
Step 6/11 : RUN npm run build
---> Running in d60f739a56f6
> check-it-frontend@0.0.0 build /app
> ng build --prod
Compiling @angular/core : es2015 as esm2015
ERROR in EINVAL: invalid argument, rename '/app/node_modules/@angular/core/core.d.ts' -> '/app/node_modules/@angular/core/core.d.ts.__ivy_ngcc_bak'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! check-it-frontend@0.0.0 build: `ng build --prod`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the check-it-frontend@0.0.0 build 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! /root/.npm/_logs/2020-03-20T11_44_02_696Z-debug.log
The command '/bin/sh -c npm run build' returned a non-zero code: 1
dockerfile:
FROM node:13.10.1-stretch as base
RUN apt-get update -qq && apt-get install -y build-essential
ADD . /app
WORKDIR /app
RUN npm ci
RUN npm run build
依赖关系:
"dependencies": {
"@angular/animations": "^9.0.7",
"@angular/cdk": "^8.2.3",
"@angular/common": "^9.0.7",
"@angular/compiler": "^9.0.7",
"@angular/core": "^9.0.7",
"@angular/forms": "^9.0.7",
"@angular/material": "^8.2.3",
"@angular/platform-browser": "^9.0.7",
"@angular/platform-browser-dynamic": "^9.0.7",
"@angular/router": "^9.0.7",
"core-js": "^2.4.1",
"rxjs": "^6.5.4",
"rxjs-compat": "^6.0.0-rc.0",
"tslib": "^1.10.0",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.900.7",
"@angular/cli": "^9.0.7",
"@angular/compiler-cli": "^9.0.7",
"@angular/language-service": "^9.0.7",
"@types/jasmine": "~2.8.3",
"@types/jasminewd2": "~2.0.2",
"@types/node": "^12.11.1",
"codelyzer": "^5.1.2",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~2.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"node-sass": "^4.13.1",
"protractor": "~5.1.2",
"ts-node": "~4.1.0",
"tslint": "~5.9.1",
"typescript": "~3.7.5"
}
我能做些什么来修复它?角度8的图像很好。我尝试了不同的节点图像,但没有任何帮助。。。
我不确定您的问题是什么,或者是什么原因造成的,但是我快速搜索了一下,偶然发现了这个github问题。它涉及并行构建(我不认为这是您的情况),但我认为它仍然可以应用于这里,因为错误发生在angular core的编译过程中。
建议的解决方法是将角兼容性编译器(ngcc
)作为postset
脚本运行,而不是让构建本身触发它。
修改您的package.json
文件,并将以下内容添加到脚本
部分:
"postinstall": "ngcc
一旦我升级到Flutter2.5.1,我的项目就停止构建和运行,并出现以下错误: /users/admin/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator_android-2.0.0/android/src/main/java/com/baseflow/geolocator/location/locationmapper.
问题内容: 我正在从码头8升级到码头9,并且遇到了一些API中编译失败的问题。 SslSelectChannelConnector已被删除,从我看到的带有secureRequestCustomizer的httpConfiguration替换了它。 但是我在这两种方法上找不到很多方法。例如 setRequestBufferSize setResponseBufferSize setAcceptors
将debian 8 jessie升级到debian 9 strech后,ssh服务无法启动 ssh.service-OpenBSD Secure Shell server loaded:loaded(/lib/systemd/system/ssh.service;enabled;vendor preset:enabled) active:failed(结果:exit-code)自世界协调时2021
问题内容: 升级后,我的代码不再编译。作为maven依赖项包含的库中的导入显示了无法解析符号的编译问题。我已经使缓存无效并重新启动了Intellij。我已经清除了.m2 / repository,并在依赖项中看到了Intellij repull。引入依赖项似乎可以很好地工作,但是我无法猜测是否可以加载。 在我的Idea日志中,我看到以下异常: 问题答案: 在“设置| Maven |导入”中禁用Ma
我在Linux上使用Android Studio。 今天,我已经将其更新到stable,但现在我无法构建任何项目,甚至无法创建新项目。 没有错误消息,只是建设进度无限时间工作! 编辑1: 我还将Gradle插件更新到,这是在查看后的一条推荐消息 编辑2: