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

Login broken in 2.5.1 #861

Closed
karalaine opened this issue May 7, 2020 · 9 comments · Fixed by #862
Closed

Login broken in 2.5.1 #861

karalaine opened this issue May 7, 2020 · 9 comments · Fixed by #862
Labels

Comments

@karalaine
Copy link

karalaine commented May 7, 2020

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'
}
@limouren
Copy link

limouren commented May 7, 2020

Same here

@cychiuae
Copy link

cychiuae commented May 7, 2020

I also encountered this error

@jimcky
Copy link

jimcky commented May 7, 2020

same here :(

@jimmywongz
Copy link

Anyone can help to fix this?

@karalaine
Copy link
Author

Anyone can help to fix this?

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

@jp-andre
Copy link
Contributor

jp-andre commented May 7, 2020

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]

@jp-andre
Copy link
Contributor

jp-andre commented May 7, 2020

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

jp-andre pushed a commit that referenced this issue May 7, 2020
This reverts commit 3b8c2cf.
This new version causes an issue with `appcenter login` on some
platforms.

Hopefully fixes #861
@jp-andre jp-andre reopened this May 7, 2020
@karalaine
Copy link
Author

karalaine commented May 7, 2020

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

@jp-andre
Copy link
Contributor

jp-andre commented May 8, 2020

@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.

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

Successfully merging a pull request may close this issue.

7 participants