Skip to content

Version 1.10 breaks the CLI #3697

Closed
Closed

Description

@fatso83

Prettier 1.10.0

$ npm i -g prettier
/usr/local/bin/prettier -> /usr/local/lib/node_modules/prettier/bin/prettier.js
+ [email protected]
added 1 package in 0.619s

$ prettier
module.js:529
    throw err;
    ^

Error: Cannot find module '../../index'
    at Function.Module._resolveFilename (module.js:527:15)
    at Function.Module._load (module.js:476:23)
    at Module.require (module.js:568:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/prettier/bin/prettier.js:38012:20)

Expected behavior:
It would list out the options

Activity

  1. fatso83 commented on Jan 10, 2018

    @fatso83
    Author

    By changing the require statements in line 38012 and 38746 from ../../index to ../index the CLI starts working again.

  2. fatso83 commented on Jan 10, 2018

    @fatso83
    Author

    This is fixed by 1.10.1!

     npm show [email protected] time
    
    ...
         '1.10.0': '2018-01-10T12:07:19.820Z',
         '1.10.1': '2018-01-10T12:26:45.817Z' },
    

    That's a quick turnaround (less than 10 minutes from issue reported) 😮

    The fix has not been pushed yet, though, but it's on NPM.

  3. azz commented on Jan 10, 2018

    @azz
    Member

    Sorry about that! Looks like our distribution tests didn't catch this. I've patched it in 1.10.1 but we'll have to improve the process.

  4. fatso83 commented on Jan 10, 2018

    @fatso83
    Author

    Thanks for the quick turnaround!

  5. added this to the 1.10.1 milestone on Jan 10, 2018
  6. azz commented on Jan 10, 2018

    @azz
    Member

    Fix is in cf511ec, I've opened #3698 to prevent this in the future.

  7. added
    locked-due-to-inactivity
    on Jul 6, 2018
  8. locked as resolved and limited conversation to collaborators on Jul 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    locked-due-to-inactivity

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions