Skip to content

Error: Could not find a package.json for this project #539

Closed
@leobenkel

Description

@leobenkel

Hello,

I am having a weird bug that showed up out of nowhere:

12:12:47 PM: ────────────────────────────────────────────────────────────────
12:12:47 PM:   1. onPreBuild command from @netlify/plugin-nextjs             
12:12:47 PM: ────────────────────────────────────────────────────────────────
12:12:47 PM: ​
12:12:47 PM: Using Next.js 10.2.3
12:12:47 PM: ​
12:12:47 PM: ────────────────────────────────────────────────────────────────
12:12:47 PM:   Plugin "@netlify/plugin-nextjs" failed                        
12:12:47 PM: ────────────────────────────────────────────────────────────────
12:12:47 PM: ​
12:12:47 PM:   Error message
12:12:47 PM:   Error: Could not find a package.json for this project
12:12:47 PM: ​
12:12:47 PM:   Plugin details
12:12:47 PM:   Package:        @netlify/plugin-nextjs
12:12:47 PM:   Version:        3.7.1
12:12:47 PM:   Repository:     git+https://github.com/netlify/netlify-plugin-nextjs.git
12:12:47 PM:   npm link:       https://www.npmjs.com/package/@netlify/plugin-nextjs
12:12:47 PM:   Report issues:  https://github.com/netlify/netlify-plugin-nextjs/issues
12:12:47 PM: ​
12:12:47 PM:   Error location
12:12:47 PM:   In "onPreBuild" event in "@netlify/plugin-nextjs" from netlify.toml and package.json
12:12:47 PM:       at onPreBuild (/node_modules/@netlify/plugin-nextjs/index.js:27:14)
12:12:47 PM: ​
12:12:47 PM:   Resolved config
12:12:47 PM:   build:
12:12:47 PM:     command: npm run build
12:12:47 PM:     commandOrigin: config
12:12:47 PM:     environment:
12:12:47 PM:       - REVIEW_ID
12:12:47 PM:     publish: /opt/build/repo/out
12:12:47 PM:     publishOrigin: config
12:12:47 PM:   plugins:
12:12:47 PM:     - inputs: {}
12:12:47 PM:       origin: config
12:12:47 PM:       package: '@netlify/plugin-nextjs'
12:12:47 PM:     - inputs:
12:12:47 PM:         prettyURLs: true
12:12:47 PM:         trailingSlash: false
12:12:47 PM:       origin: config
12:12:47 PM:       package: '@netlify/plugin-sitemap'
12:12:47 PM:     - inputs:
12:12:47 PM:         compress: true
12:12:47 PM:         pretty: false
12:12:47 PM:         svgAsImage: false
12:12:47 PM:       origin: config
12:12:47 PM:       package: netlify-plugin-inline-source
12:12:47 PM:     - inputs: {}
12:12:47 PM:       origin: config
12:12:47 PM:       package: netlify-plugin-cache-nextjs

What is going on ?

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