netlify deployment: Failed during stage ‘building site’: Build script returned non-zero exit code: 2

I found the same error when trying to deploy my single-page React JS web applications to Netlify. Following is the procedure I followed to solve the issue and successfully deploy the site. Go to Site Settings. Select Build & Deploy dropdown from the menu. Select Continuous Deployment tab from the dropdown. Under the section Build … Read more

Angular routing not working on Netlify on page refresh

Old question, but for those who might stumble on it on how to enable angular routing in Netlify. Create a file _redirects in your src folder, add the following to it: /* /index.html 200 in your angular.json file add the following to projects.architect.build.options.assets { “glob”: “_redirects”, “input”: “src”, “output”: “https://stackoverflow.com/” } If you happen to … Read more

vue: Uncaught TypeError: Cannot read property … of undefined

Just use v-if on a common parent to all the elements in your template relying on that AJAX call, not around each one. So instead of something like: <div> <h1 v-if=”foo.title”>{{ foo.title }}</h1> <p v-if=”foo.description”>{{ foo.description }}</p> </div> Do <div> <template v-if=”foo”> <h1>{{ foo.title }}</h1> <p>{{ foo.description }}</p> </template> </div>

Netlify renders 404 on page refresh (using React and react-router)

This was simple and it worked for me. I found this link https://create-react-app.dev/docs/deployment#netlify So as suggested by that link, I added a _redirects file inside the /public folder like /public/_redirects. I then pasted /* /index.html 200 into the _redirects file. I did all that in my VS Code, after which I pushed to github and … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)