I get an error when running npm install. The error is: Environment: OS: Windows 10 | reactjs: 18.2.0 | Node: 16.17.0 | npm: 8.17.0 Answer Run Then set npm registry And finally install packages This worked for me although I have found other users getting it to work by simply clearing the cache and then installing packages directly without configuring
Tag: netlify
Netlify form doesn’t work with a Material-UI modal
I’ve a simple Next.js app on Netlify that open a form to click on the subscribe button. Code Here is the index file: pages/index.js Here is the modal: components/SubscribeModal.js I also have a simple pages/success.js app with a success message. Problem When I click on the submit button, a 404 page appear. Tried solution I’ve tried every tag in the
How should I configure workbox to support offline caching of third party requests?
I am currently using the workbox-build module, specifically the generateSW mode, to generate my service worker scripts to deploy my web application to Netlify. My site is a static site. Here is my worker-config.js: This configuration works well for online use. However, third party requests to certain assets (i.e. images, Javascript, etc.) are not successfully precached for offline usage. Netlify
ReferenceError when deploying project to Netlify
I am encountering an issue when deploying my React project to Netlify saying that my editUserInfo function within my profile-info view is not defined. Additionally, I am using React-Router to switch views in my project. This works perfectly in development and all of my links work fine until I try accessing the profile view. Other than this, the site deployed
Getting environment variables to work in next js and netlify
I have deployed a next js application to netlify using git and I have a .env.local file that stores the backend route url that I use everywhere throughout the app when making fetch requests. The problem is that after deployment the process.env.NEXT_PUBLIC_BACKEND_ROUTE returns undefined. The .env.local file: NEXT_PUBLIC_BACKEND_ROUTE=https://[the name of the url].herokuapp.com/ An example of a page using the environment
Protect Web pages using password or authentication service
I would like to know if there is a way to password protect web pages developed with simple HTML/ javascript. I am hosting the web page on netlify and I have also tried hosting on Firebase and it is working from both ends but I do not want anyone with a link to be able to view and use the
public files not found on deployment
The static files in this code’s src file are not found though they work locally just fine. What am I doing wrong in the deployment? the deployment HERE Answer the problem was that I should have put all the public/ static files in the public folder that netlify sees in the main root