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

Bug: package.json does not have a valid "main" entry? #211

Closed
Mach12 opened this issue May 5, 2021 · 2 comments
Closed

Bug: package.json does not have a valid "main" entry? #211

Mach12 opened this issue May 5, 2021 · 2 comments
Assignees
Labels
type: bug Functionality that does not work as intended/expected

Comments

@Mach12
Copy link

Mach12 commented May 5, 2021

Info

Tool Version
Plugin v1.15.0
Prettier v2.2.1
Framework vue
Node v12.22.1
OS linux

Prettier config

{
  "trailingComma": "none",
  "tabWidth": 2,
  "semi": false,
  "singleQuote": true,
  "overrides": [
    {
      "files": "*.pug",
      "options": {
        "parser": "pug",
        "singleQuote": false
      }
    }
  ],
  "printWidth": 120
}

Input

//- N/A

Output or Error

 error  in ./src/main.ts

Syntax Error: Error: Cannot find module '<project_path>/node_modules/@prettier/plugin-pug/dist/index.js'. Please verify that the package.json has a valid "main" entry
Occurred while linting <project_path>/src/main.ts:1
    at Array.map (<anonymous>)
    at Array.map (<anonymous>)
    at Array.forEach (<anonymous>)


 @ multi (webpack)-dev-server/client?http://192.168.2.71:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.ts

Expected Output

//- N/A

Additional Context

Looking at the contents of node_modules/@prettier/plugin-pug, it would seem the entire dist directory is missing. It was not missing in the 1.14 releases, might be some kind of problem with deployment or something?

@Mach12 Mach12 changed the title Bug: Bug: package.json does not have a valid "main" entry? May 5, 2021
@Shinigami92
Copy link
Member

I'm so sorry 😓
I added a prepublishOnly script now so that shouldn't happen again
4b874d3

@Shinigami92 Shinigami92 self-assigned this May 5, 2021
@Shinigami92 Shinigami92 added the type: bug Functionality that does not work as intended/expected label May 5, 2021
@Shinigami92
Copy link
Member

index.js is now available again in 1.15.1
Checked: https://unpkg.com/@prettier/plugin-pug@1.15.1/dist/index.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Functionality that does not work as intended/expected
Projects
None yet
Development

No branches or pull requests

2 participants