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

Can't start after init a vue-ts project. #1580

Closed
3 tasks done
hanhan9449 opened this issue Jan 18, 2021 · 2 comments
Closed
3 tasks done

Can't start after init a vue-ts project. #1580

hanhan9449 opened this issue Jan 18, 2021 · 2 comments

Comments

@hanhan9449
Copy link

⚠️ IMPORTANT ⚠️ Please check the following list before proceeding. If you ignore this issue template, your issue will be directly closed.

  • Read the docs.
  • Use Vite >=2.0. (1.x is no longer supported)
  • If the issue is related to 1.x -> 2.0 upgrade, read the Migration Guide first.

Describe the bug

Can't start after init a vue-ts project.

Reproduction

  1. npm init @vitejs/app
  2. enter project-name
  3. choose vue-ts
  4. npm i
  5. npm run dev

System Info

  • vite version: ^2.0.0-beta.12
  • Operating System: macos big sur 11.1
  • Node version: v15.6.0
  • Package manager (npm/yarn/pnpm) and version: npm 7.4.0

Logs (Optional if provided reproduction)

➜ vite-project git:(master) ✗ vite --debug
/Users/hanhan/WebstormProjects/learning-vue/vite-project/node_modules/esbuild/bin/esbuild:2
throw new Error(`esbuild: Failed to install correctly
^

Error: esbuild: Failed to install correctly

Make sure you don't have "ignore-scripts" set to true. You can check this with
"npm config get ignore-scripts". If that returns true you can reset it back to
false using "npm config set ignore-scripts false" and then reinstall esbuild.

at Object.<anonymous> (/Users/hanhan/WebstormProjects/learning-vue/vite-project/node_modules/esbuild/bin/esbuild:2:7)
at Module._compile (node:internal/modules/cjs/loader:1108:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
at Module.load (node:internal/modules/cjs/loader:973:32)
at Function.Module._load (node:internal/modules/cjs/loader:813:14)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
at node:internal/main/run_main_module:17:47

vite:esbuild esbuild error with options used: {
loader: 'ts',
sourcemap: true,
sourcefile: '/Users/hanhan/WebstormProjects/learning-vue/vite-project/vite.config.ts',
target: 'esnext'
} +0ms
failed to load config from /Users/hanhan/WebstormProjects/learning-vue/vite-project/vite.config.ts
error when starting dev server:
Error: The service was stopped
at /Users/hanhan/WebstormProjects/learning-vue/vite-project/node_modules/esbuild/lib/main.js:846:33
at Socket.afterClose (/Users/hanhan/WebstormProjects/learning-vue/vite-project/node_modules/esbuild/lib/main.js:493:7)
at Socket.emit (node:events:391:22)
at endReadableNT (node:internal/streams/readable:1307:12)
at processTicksAndRejections (node:internal/process/task_queues:81:21)

@yyx990803
Copy link
Member

This is an esbuild install issue. Its error message already explains what you need to do. If it still doesn't work after you fix npm's ignore-script config, open an issue for esbuild instead.

@hehaosen
Copy link

evanw/esbuild#462 (comment)

@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

No branches or pull requests

3 participants