Questions and discussions about using the Shopify CLI and Shopify-built libraries.
why do i get this when i start the server?
• 04:46:06 ERROR » update assets/script.js:
Cannot overwrite generated asset 'assets/script.js'.
and this file isnt working / rendering, tho when i upload it directly to my shopify store, it works
Solved! Go to the solution
This is an accepted solution.
Hi MohammadAL,
A few questions to help me troubleshoot this for you:
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
This is an accepted solution.
Hi MohammadAL,
A few questions to help me troubleshoot this for you:
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
1- Yes
2- Yes, if I do that the JS file works
3- Yes, custom Theme
4- No, works perfectly
5- 3.50.2
Okay so it sounds like this is theme related rather than CLI related - it's possible that there's a change being made to the JS file that is not being accepted when you try to generate the theme. If you just make a simple change like a console.log is the error still appearing?
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
actually it got fixed, i did what u said, deleted it from admin, downloaded the theme then added the js file locally, and it worked, Thanks for your help ❤️