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

Cannot split a chunk that has already been edited #13589

Closed
danielroe opened this issue Mar 31, 2022 · 17 comments · Fixed by nuxt/framework#4014 or nuxt/framework#4442
Closed

Cannot split a chunk that has already been edited #13589

danielroe opened this issue Mar 31, 2022 · 17 comments · Fixed by nuxt/framework#4014 or nuxt/framework#4442

Comments

@danielroe
Copy link
Member

danielroe commented Mar 31, 2022

Getting this as a warning in test suite.

Cannot split a chunk that has already been edited (0:87 – "from "/__NUXT_BASE__/@vite/client"")

reported by @pi0

@itsmnthn
Copy link
Contributor

Getting this on yarn build
image

@ezralazuardy
Copy link

ezralazuardy commented Mar 31, 2022

it's seems that the issue only appear on the latest version of nuxi.

npm run build

image

npx nuxi info

image

Netlify deploy log (production)

image

@danielroe
Copy link
Member Author

linked: Rich-Harris/magic-string#208

@anburocky3
Copy link

I too, face the same problem. Is this why, entry-e4d7fe83.mjs:1 Hydration completed but contains mismatches. happens?

image

@danielroe
Copy link
Member Author

Downgrading to vite 2.8 (by manually installing it) should work around this issue for now.

@anburocky3
Copy link

vite 2.8

Do i have to install it vite@2.8 along with nuxt?

@danielroe
Copy link
Member Author

@anburocky3 Can you reproduce with the latest Nuxt version? We resolved a similar issue in nuxt/framework#3997.

@anburocky3
Copy link

Updated to Nuxt CLI v3.0.0-27480123.4c77c88 and checked it, still same issue.

λ yarn build
Nuxt CLI v3.0.0-27480123.4c77c88                                                                                                                15:46:05
i Using Tailwind CSS from ~/assets\css\tailwind.css                                                                            nuxt:tailwindcss 15:46:07
i Merging Tailwind config from ~/tailwind.config.js                                                                            nuxt:tailwindcss 15:46:07  

 ERROR  Cannot split a chunk that has already been edited (0:87 – "from "/__NUXT_BASE__/@vite/client"")                                         15:46:09  


 ERROR  Cannot split a chunk that has already been edited (0:87 – "from "/__NUXT_BASE__/@vite/client"")                                         15:46:09  


 ERROR  Cannot split a chunk that has already been edited (0:87 – "from "/__NUXT_BASE__/@vite/client"")                                         15:46:09  


 ERROR  Cannot split a chunk that has already been edited (0:87 – "from "/__NUXT_BASE__/@vite/client"")                                         15:46:09  

i Vite client warmed up in 3364ms                                                                                                               15:46:12
i Client built in 3436ms                                                                                                                        15:46:12
i Building server...                                                                                                                            15:46:12  
√ Server built in 950ms                                                                                                                         15:46:13
i Nitro preset is server                                                                                                                        15:46:13  
i Cleaning up .output                                                                                                                           15:46:13  
start Generating public...                                                                                                                      15:46:13
√ Generated public .output/public                                                                                                               15:46:13  
start Building server...                                                                                                                        15:46:13
start Writing server bundle...                                                                                                                  15:46:16
√ Server built                                                                                                                                  15:46:16
  ├─ .output/server/index.mjs (279 B) (174 B gzip)
  ├─ .output/server/chunks/vue3.mjs (283 B) (197 B gzip)
  ├─ .output/server/chunks/static.mjs (3.13 kB) (1.3 kB gzip)
  ├─ .output/server/chunks/server2.mjs (259 kB) (60 kB gzip)
  ├─ .output/server/chunks/server.mjs (5.38 kB) (2.05 kB gzip)
  ├─ .output/server/chunks/render.mjs (22.6 kB) (6.29 kB gzip)
  ├─ .output/server/chunks/index.mjs (395 kB) (91.1 kB gzip)
  └─ .output/server/chunks/client.manifest.mjs (515 B) (245 B gzip)
Σ Total size: 5.14 MB (1.4 MB gzip)
i You can preview this build using nuxi preview           

@danielroe
Copy link
Member Author

It's not an issue with nuxi; you'll need to update nuxt itself with npx nuxi upgrade. And the package with the update was still going through CI at the time. (For reference, it is 3.0.0-27480141.51f3bbf.)

@anburocky3
Copy link

Updating to Nuxt CLI v3.0.0-27480141.51f3bbf fixed it. Thanks. ❤️👍

@andysay
Copy link

andysay commented Apr 2, 2022

Снимок экрана 2022-04-02 в 11 21 22

problem still have

@danielroe
Copy link
Member Author

@andysay Would you open a new issue with a reproduction?

@itshizhan
Copy link

itshizhan commented Apr 16, 2022

npm run build get the error, and can't build successfully

nuxt v3.0.0-27501460.04a72f8

@danielroe danielroe reopened this Apr 16, 2022
Copy link
Member Author

Any chance of a reproduction? 🙏

@reqwire
Copy link

reqwire commented Apr 21, 2022

Am also recieving same error. I just ran npx nuxi upgrade and now i get this error
Cannot start nuxt: Cannot find module 'nuxt'
Require stack:

  • \index.js

@andysay
Copy link

andysay commented Apr 21, 2022

Am also recieving same error. I just ran npx nuxi upgrade and now i get this error Cannot start nuxt: Cannot find module 'nuxt' Require stack:

  • \index.js

change nuxt3 to nuxt and reinstall package.json look this https://github.com/nuxt/framework/discussions/2883

@reqwire
Copy link

reqwire commented Apr 21, 2022

Am also recieving same error. I just ran npx nuxi upgrade and now i get this error Cannot start nuxt: Cannot find module 'nuxt' Require stack:

  • \index.js

change nuxt3 to nuxt and reinstall package.json look this #2883

this fixed it for me - thanks!

@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment