Skip to content

Thrown error "cannot find module 'read-pkg'" #1855

@TheVirtuoid

Description

@TheVirtuoid

Version

3.0.0-rc.4

Reproduction link

https://codesandbox.io/s/vue

NOTE: The above link is there only to satisfy the submission requirements. I cannot provide a link to a CLI throwing an error. Thank you.

Steps to reproduce

  1. npm update -g @vue/cli
  2. npm install -g @vue/cli
  3. vue ui
    Error occurs after "Starting GUI..."

OR

  1. npm uninstall -g @vue/cli
  2. npm install -g @vue/cli
  3. vue ui

What is expected?

Browser window to open

What is actually happening?

Thrown error.


Last week I was successful in installing and generating a new project using vue ui.

Today, I updated @vue/cli, then tried vue ui, only to get the error mentioned below.

I tried uninstalling and installing again, but to no avail.

"vue create" using my preset created last week works.

The stack trace:

🚀  Starting GUI...
 ERROR  Error: Cannot find module 'read-pkg'
Error: Cannot find module 'read-pkg'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (C:\Users\auser\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\@vue\cli-ui\apollo-server\connectors\folders.js:5:17)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions