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
Error: Dynamic require of "tty" is not supported #31
Comments
Stumbled upon this and wanted to add that this is happening in a fresh vite v4 project. |
I'm facing the same issue with Vite@3 and Vite@4. Workarround: |
Can you please try v4.0.2? @ianzone @PodaruDragos @felixranesberger Dynamic require is a doom to me, really... |
Hi, thanks for your fast response. The latest version of Vite is currently 4.0.1 Do you mean 4.0.0-beta.2? |
vite-plugin-stylelint v4.0.2 actually |
Works like a charm, thanks for the help! |
@ianzone @PodaruDragos Can you please try the new version of vite-plugin-stylelint and tell me if it is fine? Thanks! |
HI, it works perfectly, THX |
@ModyQyW works fine with |
描述问题
failed to load config from /home/ian/acte/roomzz-v1/admin_ts/vite.config.ts
error when starting dev server:
Error: Dynamic require of "tty" is not supported
at file:///home/ian/acte/roomzz-v1/admin_ts/node_modules/.pnpm/vite-plugin-stylelint@4.0.1_hdr6qhp2cp4t47liatlblyjedi/node_modules/vite-plugin-stylelint/dist/index.js:1:376
at file:///home/ian/acte/roomzz-v1/admin_ts/node_modules/.pnpm/vite-plugin-stylelint@4.0.1_hdr6qhp2cp4t47liatlblyjedi/node_modules/vite-plugin-stylelint/dist/index.js:1:853
at file:///home/ian/acte/roomzz-v1/admin_ts/node_modules/.pnpm/vite-plugin-stylelint@4.0.1_hdr6qhp2cp4t47liatlblyjedi/node_modules/vite-plugin-stylelint/dist/index.js:1:491
at file:///home/ian/acte/roomzz-v1/admin_ts/node_modules/.pnpm/vite-plugin-stylelint@4.0.1_hdr6qhp2cp4t47liatlblyjedi/node_modules/vite-plugin-stylelint/dist/index.js:1:2468
at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:530:24)
at async loadConfigFromBundledFile (file:///home/ian/acte/roomzz-v1/admin_ts/node_modules/.pnpm/vite@4.0.1_p56klvi3zg3u723wp3set4h7pe/node_modules/vite/dist/node/chunks/dep-2285ba4f.js:63052:21)
at async loadConfigFromFile (file:///home/ian/acte/roomzz-v1/admin_ts/node_modules/.pnpm/vite@4.0.1_p56klvi3zg3u723wp3set4h7pe/node_modules/vite/dist/node/chunks/dep-2285ba4f.js:62937:28)
at async resolveConfig (file:///home/ian/acte/roomzz-v1/admin_ts/node_modules/.pnpm/vite@4.0.1_p56klvi3zg3u723wp3set4h7pe/node_modules/vite/dist/node/chunks/dep-2285ba4f.js:62558:28)
ELIFECYCLE Command failed with exit code 1.
复现
my vite.config.ts setting is
import react from "@vitejs/plugin-react-swc";
import { resolve } from 'path';
import eslintPlugin from 'vite-plugin-eslint';
import stylelintPlugin from 'vite-plugin-stylelint';
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
globals: true,
environment: 'happy-dom',
},
plugins: [
react(),
stylelintPlugin(),
eslintPlugin()
],
resolve: {
alias: {
src: resolve(__dirname, 'src'),
},
},
});
系统信息
使用的包管理器
pnpm
核对
The text was updated successfully, but these errors were encountered: