Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to run docker build images #1838

Closed
Jackychans opened this issue Sep 28, 2017 · 6 comments
Closed

Failed to run docker build images #1838

Jackychans opened this issue Sep 28, 2017 · 6 comments

Comments

@Jackychans
Copy link

Hi,

I was trying to run command line "docker build -t angular-starter ." but very quickly, it shown error since there was no git installed.

Then I added git "apk add --no-cache git" to the runtime environment and run docker build again, an error appeared as below.

Error: Error at /tmp/app/node_modules/@types/graphql/subscription/subscribe.d.ts:17:4: Cannot find name 'AsyncIterator'.
Error at /tmp/app/node_modules/@types/graphql/subscription/subscribe.d.ts:29:4: Cannot find name 'AsyncIterable'.
Error at /tmp/app/node_modules/apollo-client/core/types.d.ts:17:45: ',' expected.
Error at /tmp/app/node_modules/apollo-client/core/types.d.ts:17:47: '>' expected.
Error at /tmp/app/node_modules/apollo-client/core/types.d.ts:19:2: ';' expected.
Error at /tmp/app/node_modules/apollo-client/core/types.d.ts:19:4: Expression expected.
Error at /tmp/app/node_modules/apollo-client/core/types.d.ts:20:5: Cannot find name 'data'.
Error at /tmp/app/node_modules/apollo-client/core/types.d.ts:20:10: Expression expected.
Error at /tmp/app/node_modules/apollo-client/core/types.d.ts:20:12: Cannot find name 'T'.
Error at /tmp/app/node_modules/apollo-client/data/mutationResults.d.ts:8:48: ',' expected.
Error at /tmp/app/node_modules/apollo-client/data/mutationResults.d.ts:8:50: '>' expected.
Error at /tmp/app/node_modules/apollo-client/data/mutationResults.d.ts:10:2: ';' expected.
Error at /tmp/app/node_modules/apollo-client/data/mutationResults.d.ts:10:4: Expression expected.
Error at /tmp/app/node_modules/apollo-client/data/mutationResults.d.ts:11:6: Cannot find name 'queryName'.
Error at /tmp/app/node_modules/apollo-client/data/mutationResults.d.ts:11:15: ',' expected.
Error at /tmp/app/node_modules/apollo-client/data/mutationResults.d.ts:11:17: Cannot find name 'string'.
Error at /tmp/app/node_modules/apollo-client/data/mutationResults.d.ts:11:24: ';' expected.
Error at /tmp/app/node_modules/apollo-client/data/mutationResults.d.ts:11:26: 'MutationQueryReducer' only refers to a type, but is being used as a value here.
Error at /tmp/app/node_modules/apollo-client/data/mutationResults.d.ts:11:49: '(' expected.
Error at /tmp/app/node_modules/apollo-client/core/watchQueryOptions.d.ts:47:36: ',' expected.
Error at /tmp/app/node_modules/apollo-client/core/watchQueryOptions.d.ts:47:38: '>' expected.
Error at /tmp/app/node_modules/apollo-client/core/watchQueryOptions.d.ts:49:2: Expression expected.
Error at /tmp/app/node_modules/apollo-client/core/watchQueryOptions.d.ts:50:15: 'DocumentNode' only refers to a type, but is being used as a value here.
Error at /tmp/app/node_modules/apollo-client/core/watchQueryOptions.d.ts:50:27: ',' expected.
Error at /tmp/app/node_modules/apollo-client/core/watchQueryOptions.d.ts:51:23: ',' expected.
Error at /tmp/app/node_modules/apollo-client/core/watchQueryOptions.d.ts:52:26: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
Error at /tmp/app/node_modules/apollo-client/core/watchQueryOptions.d.ts:52:35: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
Error at /tmp/app/node_modules/apollo-client/core/watchQueryOptions.d.ts:52:43: ',' expected.
Error at /tmp/app/node_modules/apollo-client/core/watchQueryOptions.d.ts:53:21: 'MutationQueryReducersMap' only refers to a type, but is being used as a value here.
Error at /tmp/app/node_modules/apollo-client/core/watchQueryOptions.d.ts:53:48: '(' expected.
Error at /tmp/app/node_modules/apollo-client/core/watchQueryOptions.d.ts:54:22: Cannot find name 'string'.
Error at /tmp/app/node_modules/apollo-client/core/watchQueryOptions.d.ts:54:33: 'PureQueryOptions' only refers to a type, but is being used as a value here.
Error at /tmp/app/node_modules/apollo-client/core/watchQueryOptions.d.ts:54:51: ',' expected.
Error at /tmp/app/node_modules/apollo-client/core/watchQueryOptions.d.ts:55:14: 'MutationUpdaterFn' only refers to a type, but is being used as a valuehere.
Error at /tmp/app/node_modules/apollo-client/core/watchQueryOptions.d.ts:55:34: '(' expected.
Error at /tmp/app/node_modules/apollo-client/core/watchQueryOptions.d.ts:57:41: ',' expected.
Error at /tmp/app/node_modules/apollo-client/core/watchQueryOptions.d.ts:57:43: '>' expected.
Error at /tmp/app/node_modules/apollo-client/core/watchQueryOptions.d.ts:59:2: ';' expected.
Error at /tmp/app/node_modules/apollo-client/core/watchQueryOptions.d.ts:59:4: Expression expected.
Error at /tmp/app/node_modules/apollo-client/core/watchQueryOptions.d.ts:59:63: Cannot find name 'T'.
Error at /tmp/app/node_modules/apollo-client/core/watchQueryOptions.d.ts:59:74: Expression expected.
Error at /tmp/app/node_modules/zen-observable-ts/lib/zenObservable.d.ts:30:14: ',' expected.
Error at /tmp/app/node_modules/apollo-link-core/lib/types.d.ts:14:35: ',' expected.
Error at /tmp/app/node_modules/apollo-link-core/lib/types.d.ts:14:43: ',' expected.
Error at /tmp/app/node_modules/apollo-link-core/lib/types.d.ts:14:44: Type parameter name cannot be 'string'
Error at /tmp/app/node_modules/apollo-link-core/lib/types.d.ts:14:52: Type parameter name cannot be 'any'
Error at /tmp/app/node_modules/apollo-link-core/lib/types.d.ts:14:56: '(' expected.
Error at /tmp/app/node_modules/apollo-link-core/lib/types.d.ts:14:58: Cannot find name 'E'.
Error at /tmp/app/node_modules/apollo-link-core/lib/types.d.ts:14:62: 'Record' only refers to a type, but is being used as a value here.
Error at /tmp/app/node_modules/apollo-link-core/lib/types.d.ts:14:69: Cannot find name 'string'.
Error at /tmp/app/node_modules/apollo-link-core/lib/types.d.ts:14:77: Cannot find name 'any'.
Error at /tmp/app/node_modules/apollo-link-core/lib/types.d.ts:14:83: Expression expected.
Error at /tmp/app/node_modules/apollo-link-core/lib/types.d.ts:14:85: 'ExecutionResult' only refers to a type, but is being used as a value here.
Error at /tmp/app/node_modules/apollo-link-core/lib/types.d.ts:14:103: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
Error at /tmp/app/node_modules/apollo-link-core/lib/types.d.ts:15:18: Cannot find name 'E'.
Error at /tmp/app/node_modules/apollo-link-core/lib/types.d.ts:15:19: ',' expected.
Error at /tmp/app/node_modules/apollo-link-core/lib/types.d.ts:16:15: Cannot find name 'C'.
Error at /tmp/app/node_modules/apollo-link-core/lib/types.d.ts:16:16: ',' expected.
Error at /tmp/app/node_modules/apollo-link-core/lib/types.d.ts:18:69: Generic type 'FetchResult' requires 2 type argument(s).
Error at /tmp/app/node_modules/apollo-link-core/lib/types.d.ts:19:95: Generic type 'FetchResult' requires 2 type argument(s).
Error at /tmp/app/node_modules/apollo-link-core/lib/link.d.ts:10:76: Generic type 'FetchResult' requires 2 type argument(s).
Error at /tmp/app/node_modules/apollo-link-core/lib/link.d.ts:12:90: Generic type 'FetchResult' requires 2 type argument(s).
Error at /tmp/app/node_modules/apollo-link-core/lib/link.d.ts:16:66: Generic type 'FetchResult' requires 2 type argument(s).
Error at /tmp/app/node_modules/apollo-angular/build/src/Apollo.d.ts:14:24: Generic type 'MutationOptions' requires 1 type argument(s).
at UserError.Error (native)
at new UserError (/tmp/tools/@angular/tsc-wrapped/src/tsc.ts:33:5)
at check (/tmp/tools/@angular/tsc-wrapped/src/tsc.ts:81:11)
at Tsc.typeCheck (/tmp/tools/@angular/tsc-wrapped/src/tsc.ts:168:5)
at /tmp/tools/@angular/tsc-wrapped/src/main.ts:154:11
at process._tickCallback (internal/process/next_tick.js:103:7)

npm ERR! Linux 4.9.41-moby
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "webpack" "--" "--config" "config/webpack.prod.js" "--progress" "--profile" "--bail"
npm ERR! node v6.9.5
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] webpack: node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js "--config" "config/webpack.prod.js" "--progress" "--profile" "--bail"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] webpack script 'node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js "--config" "config/webpack.prod.js" "--progress" "--profile" "--bail"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the Mean package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js "--config" "config/webpack.prod.js" "--progress" "--profile" "--bail"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs Mean
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls Mean
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /tmp/app/npm-debug.log

npm ERR! Linux 4.9.41-moby
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "build:aot:prod"
npm ERR! node v6.9.5
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build:aot:prod: npm run clean:dist && npm run clean:aot && cross-env BUILD_AOT=1 npm run webpack -- --config config/webpack.prod.js --progress --profile --bail
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build:aot:prod script 'npm run clean:dist && npm run clean:aot && cross-env BUILD_AOT=1 npm run webpack -- --config config/webpack.prod.js --progress --profile --bail'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the Mean package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run clean:dist && npm run clean:aot && cross-env BUILD_AOT=1 npm run webpack -- --config config/webpack.prod.js --progress --profile --bail
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs Mean
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls Mean
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /tmp/app/npm-debug.log

npm ERR! Linux 4.9.41-moby
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "build:aot"
npm ERR! node v6.9.5
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build:aot: npm run build:aot:prod
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build:aot script 'npm run build:aot:prod'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the Mean package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run build:aot:prod
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs Mean
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls Mean
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /tmp/app/npm-debug.log

screen shot 2017-09-29 at 00 49 04

@chanakaDe
Copy link
Contributor

Hey buddy, we can use esnext lib to fix this issue.
First clean npm cache and add following lines to tsconfig.json in your project.

"compilerOptions": {
 "lib": [
    "esnext.asynciterable"
  ],
. . .

This will fix your issue.

@chanakaDe
Copy link
Contributor

@Jackychans Please follow above step and let me know the situation. 👍

@Jackychans
Copy link
Author

@chanakaDe thanks. Added "esnext.asynciterable" but it still same error. You can doublecheck by starting from the top with git clone and run docker build

@Jackychans
Copy link
Author

still unable to resolve issue above. Something wrong during ts compilation

@ghost
Copy link

ghost commented Nov 26, 2017

Same problem here. Cannot get it to work with docker

@etaletovic
Copy link

Any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants