Having trouble to deploy my Vue app. This is the first time I run in to this issue.
Hey @mimmimiro
As mentioned in the log (much better to post deploy logs as text rather than images) there is no package.json
in the root of the repository which is required to build.
Is the code you wish to deploy in a sub-directory perhaps?
Check out
and more in
If you are still having issues, can you provide a link to the repository you are deploying.
Hi,
Yes, I think it is in the sub directory. This projest also contains sanity studio. How can I choose only on directory? I have netlify.toml file under my public folder also
You can set the base directory in the build settings via the UI
My netlify.toml file. Still not working. I give up
[build]
base = ‘app/’
publish = ‘dist/’
command = ‘npm run build’
[[redirects]]
from = “/*”
to = “/index.html”
status = 200
Did you set a base directory via the UI?
Where is this netlify.toml
file? Is it inside the base directory? If it is, then you need to remove the base = "app/"
from the file as it is inside the base already.
If this isn’t the case, can you share the repository?
here is the link to my repository: GitHub - mimmimiro/sanity
The netlify.toml
is in the wrong directory. You need to put it into the app
directory, not app/public
. And you need to remove the base = "app/"
as previously mentioned.
I did as you recommended. Still not working, I get the same error if I try to deprly the repository and set the commands to npm run build and dist as publish directory. If I skip this part, the sites appear with page not foun 404 error.
I really dont know what the issue is.
I have deployed your repository to https://bejewelled-jelly-772a7c.netlify.app
These are the build settings in the UI
Because there is a netlify.toml
in the base directory (app
) Netlify uses those settings for the build command and publish directory.
omg! thank you. I can try that too