firestore-migrator icon indicating copy to clipboard operation
firestore-migrator copied to clipboard

Error occurrred while npm run build

Open ableme opened this issue 5 years ago • 8 comments

$ npm run build

[email protected] build D:\cjexpress\firestore-migrator tsc

node_modules/google-auth-library/build/src/auth/oauth2client.d.ts(298,55): error TS1039: Initializers are not allowed in ambient contexts. npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! [email protected] build: tsc npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the [email protected] build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Environment OS : windows 10 Node: node 12.3.1

ableme avatar Jun 01 '19 16:06 ableme

I solved the issue updating typescript to v3.2.2

.
.
.
"devDependencies": {
    "@types/csvtojson": "^1.1.5",
    "@types/fs-extra": "^5.0.1",
    "@types/lodash": "^4.14.106",
    "@types/node": "^10.5.7",
    "typescript": "^3.2.2"
  },
.
.

predorock avatar Jun 17 '19 10:06 predorock

I solved the issue updating typescript to v3.2.2

.
.
.
"devDependencies": {
    "@types/csvtojson": "^1.1.5",
    "@types/fs-extra": "^5.0.1",
    "@types/lodash": "^4.14.106",
    "@types/node": "^10.5.7",
    "typescript": "^3.2.2"
  },
.
.

sorry it's doesn't work. I try both with 3.2.2 and the lastest version 3.5.2 And I try with 2 version of Node10.16.0 and the lastest 12.4.0 but I still can not use npm run build

tanin5462 avatar Jun 18 '19 04:06 tanin5462

@tanin5462 did work for me with v3.2.2

pablomaurer avatar Jun 27 '19 13:06 pablomaurer

I solved the issue updating typescript to v3.2.2

.
.
.
"devDependencies": {
    "@types/csvtojson": "^1.1.5",
    "@types/fs-extra": "^5.0.1",
    "@types/lodash": "^4.14.106",
    "@types/node": "^10.5.7",
    "typescript": "^3.2.2"
  },
.
.

sorry it's doesn't work. I try both with 3.2.2 and the lastest version 3.5.2 And I try with 2 version of Node10.16.0 and the lastest 12.4.0 but I still can not use npm run build

Change it, do another npm install then try again

JStrawn avatar Jul 03 '19 19:07 JStrawn

After the change to Typescript 3.2.2 by changing the package.json withe the contents in the previous post, followed by running npm install, the problem was solved and it npm run build worked for me. Thanks!

cdcv avatar Aug 07 '19 11:08 cdcv

After the change to Typescript 3.2.2 by changing the package.json withe the contents in the previous post, followed by running npm install, the problem was solved and it npm run build worked for me. Thanks!

Remove "node_modules" also.

julianandrade avatar Oct 22 '19 18:10 julianandrade

https://stackoverflow.com/questions/57331779/typescript-duplicate-identifier-iteratorresult

This also required for me

pjc0247 avatar Dec 03 '19 14:12 pjc0247

Issue resolved by pull request referenced above

19007361 avatar Mar 17 '20 21:03 19007361