Skip to content

npm run build 报错 #39

Description

@fengqing11
(base) PS C:\Users\tanyl\opensource\vite-plugin-chrome-extension\examples\background> pnpm run build

> hello-world@1.0.0 build C:\Users\tanyl\opensource\vite-plugin-chrome-extension\examples\background
> vite build

failed to load config from C:\Users\tanyl\opensource\vite-plugin-chrome-extension\examples\background\vite.config.ts
error during build:
Error: Cannot find module 'C:\Users\tanyl\opensource\vite-plugin-chrome-extension\examples\background\node_modules\vite-plugin-chrome-extension\lib\index-cjs.js'. Please verify that the package.json has a valid "main" entry
    at tryPackage (node:internal/modules/cjs/loader:443:19)
    at Module._findPath (node:internal/modules/cjs/loader:711:18)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1126:27)
    at Module._load (node:internal/modules/cjs/loader:981:27)
    at Module.require (node:internal/modules/cjs/loader:1231:19)
    at require (node:internal/modules/helpers:177:18)
    at Object.<anonymous> (C:\Users\tanyl\opensource\vite-plugin-chrome-extension\examples\background\vite.config.ts:34:43)
    at Module._compile (node:internal/modules/cjs/loader:1364:14)
    at require.extensions.<computed> [as .ts] (C:\Users\tanyl\opensource\vite-plugin-chrome-extension\examples\background\node_modules\.pnpm\vite@2.9.18\node_modules\vite\dist\node\chunks\dep-0a035c79.js:62011:20)
    at Module.load (node:internal/modules/cjs/loader:1203:32)
 ELIFECYCLE  Command failed with exit code 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions