Amanda
Amanda

Reputation: 33

NPM RUN DEV Freezing

I am trying to install laravel and breeze. Everything goes fine up to npm install. But when I run npm dev it freezes and nothing else happens. Below is what it says when it stops:

VITE v3.0.9  ready in 1434 ms

  ➜  Local:   http://127.0.0.1:5176/
  ➜  Network: use --host to expose

  LARAVEL v9.25.1  plugin v0.5.4

  ➜  APP_URL: http://localhost

Please! How do I resolve this?

UPDATE: After running npm build, npm run dev still freezes. Below is the code.

npm run build

> build     
> vite build

vite v3.0.9 building for production...
✓ 119 modules transformed.
public/build/manifest.json             0.25 KiB
public/build/assets/app.c090eeea.css   186.93 KiB / gzip: 26.55 KiB
public/build/assets/app.aac2dc08.js    170.64 KiB / gzip: 57.15 KiB

amand@Amanda MINGW64 /c/laragon/www/patinoire
$ npm run dev

> dev
> vite

Port 5173 is in use, trying another one...
Port 5174 is in use, trying another one...

  VITE v3.0.9  ready in 1043 ms

  ➜  Local:   http://127.0.0.1:5175/
  ➜  Network: use --host to expose

  LARAVEL v9.25.1  plugin v0.5.4

  ➜  APP_URL: http://localhost

Upvotes: 2

Views: 2739

Answers (2)

circular_reference
circular_reference

Reputation: 387

This happened to me because I made a circular reference by mistake. I made a React component like this which is clearly invalid. After removing TaskCard from the TaskCard component, chrome stoped freezing. I wonder why there is no error showing up. I was able to even build by npm run build. Maybe because I used the same type name for props too. I corrected this as well.

export const TaskCard = (props: TaskCard) => {
  const { key, title, onClick: onClick } = props

  return (
    <Card className=''>
      <p>{title}</p>
      <TaskCard key={key} onClick={onClick} title={title} />
    </Card>
  )
}

Upvotes: 0

Laravel
Laravel

Reputation: 153

try

npm run build

npm run dev

i think it will work

Upvotes: 1

Related Questions