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

Regression - The entry point cannot be marked as external #1763

Closed
leepowelldev opened this issue Jan 28, 2021 · 2 comments · Fixed by #1772
Closed

Regression - The entry point cannot be marked as external #1763

leepowelldev opened this issue Jan 28, 2021 · 2 comments · Fixed by #1772

Comments

@leepowelldev
Copy link

leepowelldev commented Jan 28, 2021

Vite version: 2.0.0-beta.52
Node version: v15.3.0
Platform: OS X 11.1

This has only happened in the release since yesterday. Given the following config:

import { resolve } from 'path';
import { defineConfig } from 'vite';

export default defineConfig({
  server: {
    open: false,
  },
  clearScreen: false,
  build: {
    manifest: true,
    sourcemap: true,
    rollupOptions: {
      input: {
        home: resolve(__dirname, './src/home.ts'),
        about: resolve(__dirname, './src/about.ts'),
      },
    },
  },
  plugins: [],
});

When npm run dev is run, the following error occurs:

> error: The entry point "/path/to/wordpress/wp-content/themes/skeleton/src/home.ts" cannot be marked as external

 > error: The entry point "/path/to/wordpress/wp-content/themes/skeleton/src/about.ts" cannot be marked as external

error when starting dev server:
Error: Build failed with 1 error:
error: The entry point "/path/to/home.ts" cannot be marked as external
    at failureErrorWithLog (/path/to/wordpress/wp-content/themes/skeleton/node_modules/esbuild/lib/main.js:969:15)
    at buildResponseToResult (/path/to/wordpress/wp-content/themes/skeleton/node_modules/esbuild/lib/main.js:767:32)
    at /path/to/wordpress/wp-content/themes/skeleton/node_modules/esbuild/lib/main.js:819:20
    at handleIncomingPacket (/path/to/wordpress/wp-content/themes/skeleton/node_modules/esbuild/lib/main.js:566:9)
    at Socket.readFromStdout (/path/to/wordpress/wp-content/themes/skeleton/node_modules/esbuild/lib/main.js:482:7)
    at Socket.emit (node:events:376:20)
    at addChunk (node:internal/streams/readable:304:12)
    at readableAddChunk (node:internal/streams/readable:279:9)
    at Socket.Readable.push (node:internal/streams/readable:218:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:192:23)

npm run build works as expected.

@ElMassimo
Copy link
Contributor

ElMassimo commented Jan 28, 2021

Reproduction 🐞

The issue can be replicated in this application, by running pnpm install and pnpm dev.

Notes ✏️

build works as expected, so it's only related to the scanning of dependencies for optimization.

#1772 contains a possible fix.

@ais-one
Copy link
Contributor

ais-one commented Jan 29, 2021

I may have a problem with this library "@jamescoyle/vue-icon": "^0.1.0"

Will create a simple use case and see into this problem more

@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants