You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
@rollup/plugin-auto-install works correctly during serve, but fails at build time. Starting from Vanilla worked correctly, but it doesn't when using @vitejs/plugin-vue
Here is the error, looks like it is trying to install vue related dependencies instead of only nanoid (as it does during serve)
$ vite build
building for production...
installing vite...
installing @vue/runtime-dom...
installing @vue/shared...
installing nanoid...
[auto-install] Command failed: yarn add vite
error An unexpected error occurred: "ENOENT: no such file or directory, lstat 'C:\\vite-rollup-plugin-auto-install\\node_modules\\esbuild'".
error during build:
Error: Command failed: yarn add vite
error An unexpected error occurred: "ENOENT: no such file or directory, lstat 'C:\\vite-rollup-plugin-auto-install\\node_modules\\esbuild'".
at ChildProcess.exithandler (node:child_process:333:12)
at ChildProcess.emit (node:events:376:20)
at maybeClose (node:internal/child_process:1063:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:295:5)
error Command failed with exit code 1.
Describe alternatives you've considered
I do not know if this is an issue with the plugin or with vite. The plugin could also only be applied only during serve:
Tested this with Vite 3 and latest of plugin-vue and @rollup/plugin-auto-install, and I got the error of [vite:build-import-analysis] Command failed: pnpm install plugin-vue:export-helper in both dev and build. Looks like it isn't happy with the : and thinks it's an npm package that can be installed. I don't think this is an issue in Vite though as any plugins could resolve to something like this, the rollup plugin should validate the npm package before installing. Once fixing the check locally the dev and build runs fine. I'll close this as an upstream issue.
Is your feature request related to a problem? Please describe.
@rollup/plugin-auto-install works correctly during serve, but fails at build time. Starting from Vanilla worked correctly, but it doesn't when using @vitejs/plugin-vue
This is a repro: https://github.com/matias-capeletto/vite-rollup-plugin-auto-install
nanoid is not listed as a dependency, it should be added automatically.
Here is the error, looks like it is trying to install vue related dependencies instead of only nanoid (as it does during serve)
Describe alternatives you've considered
I do not know if this is an issue with the plugin or with vite. The plugin could also only be applied only during serve:
Additional context
vite version: 2.0.0-beta.23
Operating System: Windows 10 Home, 10.0.18363 N/A Build 18363
Node version: v15.5.0
Package manager and version: yarn v1.22.10
The text was updated successfully, but these errors were encountered: