Appcenter-cli: Login broken in 2.5.1

Created on 7 May 2020  路  9Comments  路  Source: microsoft/appcenter-cli

After updating to 2.5.1, cannot login anymore

TeamCity$ appcenter login --token <mytoken>
internal/modules/cjs/loader.js:614
  throw e;
  ^

Error: No valid exports main found for '/usr/local/lib/node_modules/appcenter-cli/node_modules/uuid'
    at resolveExportsTarget (internal/modules/cjs/loader.js:611:9)
    at applyExports (internal/modules/cjs/loader.js:492:14)
    at resolveExports (internal/modules/cjs/loader.js:541:12)
    at Function.Module._findPath (internal/modules/cjs/loader.js:643:22)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:941:27)
    at Function.Module._load (internal/modules/cjs/loader.js:847:27)
    at Module.require (internal/modules/cjs/loader.js:1016:19)
    at require (internal/modules/cjs/helpers.js:69:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/appcenter-cli/dist/util/apis/telemetry-filter.js:7:16)
    at Module._compile (internal/modules/cjs/loader.js:1121:30) {
  code: 'MODULE_NOT_FOUND'
}
bug

Most helpful comment

Same here

All 9 comments

Same here

I also encountered this error

same here :(

Anyone can help to fix this?

Anyone can help to fix this?

Old version still works, you can revert to it by running
npm install -g [email protected]

Hi all. I'm extremely sorry this is happening.

I suspect that PR #843 is the root cause of this issue. I am personally unable to reproduce on either Arch Linux, Windows 10 or macOS (Catalina). Node 10 is recommended but I also tested on a variety of other versions.

While we're preparing a fix, can you please share the following information:

  • Node version
  • npm version (or yarn, pnpm, both are untested)
  • OS & version

In the meantime, @karalaine proposed a solution that should work:

Old version still works, you can revert to it by running
npm install -g [email protected]

If someone experiencing the problem could also test #862 that would be lovely.

If someone experiencing the problem could also test #862 that would be lovely.

System:
macOS 10.14.6
npm 6.13.1
node v13.2.0

Freshly built master works in the problematic system. I cannot even build the v2.5.1 tag:

[23:08:44] Finished 'copy-assets' after 500 ms
src/util/apis/telemetry-filter.ts(8,30): error TS7016: Could not find a declaration file for module 'uuid'. '/Users/TeamCity/appcenter-cli/node_modules/uuid/dist/index.js' implicitly has an 'any' type.
  Try `npm install @types/uuid` if it exists or add a new declaration (.d.ts) file containing `declare module 'uuid';`
TypeScript: 1 semantic error
TypeScript: emit succeeded (with errors)
[23:08:51] 'build-ts' errored after 7.34 s
[23:08:51] Error: TypeScript: Compilation failed
    at Output.mightFinish (/Users/TeamCity/appcenter-cli/node_modules/gulp-typescript/release/output.js:130:43)
    at /Users/TeamCity/appcenter-cli/node_modules/gulp-typescript/release/output.js:43:22
    at processTicksAndRejections (internal/process/task_queues.js:93:5)[23:08:44] Finished 'copy-assets' after 500 ms
src/util/apis/telemetry-filter.ts(8,30): error TS7016: Could not find a declaration file for module 'uuid'. '/Users/TeamCity/appcenter-cli/node_modules/uuid/dist/index.js' implicitly has an 'any' type.
  Try `npm install @types/uuid` if it exists or add a new declaration (.d.ts) file containing `declare module 'uuid';`
TypeScript: 1 semantic error
TypeScript: emit succeeded (with errors)
[23:08:51] 'build-ts' errored after 7.34 s
[23:08:51] Error: TypeScript: Compilation failed
    at Output.mightFinish (/Users/TeamCity/appcenter-cli/node_modules/gulp-typescript/release/output.js:130:43)
    at /Users/TeamCity/appcenter-cli/node_modules/gulp-typescript/release/output.js:43:22
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

Same error with WSL debian

@karalaine, thanks for the original report and this response.

I couldn't reproduce this, though I can note that all the versions used are different. Are you using nvm or similar to switch npm version? From your original comment, it looks like a global install.

A new version with uuid 7 has been published on npmjs.

Was this page helpful?
0 / 5 - 0 ratings