Uglifier error when trying to deploy Rails5 app to heroku
Running RAILS_ENV=production bin/rails assets:precompileRAILS_ENV=production bin/rails assets:precompile begins the precompile process, but it immediately errors out with the following message (For...
View ArticleSetting up SSL for localhost (MacOS / rails / react / vite)
I'm trying to configure an app on my local development environment to use SSL. I started down this path when I noticed a CORS error upon trying to request data from the back end Rails API. When I try...
View ArticleComment by Misha Krul on server-side / client-side routing problem on browser...
That didn't fix it :\
View Articleundefined currentUser in redux thunk
Here is the cloned repo I'm working in: https://github.com/mkrul/web-template (yes I'm aware this is using some VERY outdated conventions. I have plans to refactor this but right now I'm just trying to...
View ArticleGetting an undefined body in express PUT request
I have a React / Node / Express app where I am trying to update a user.The Redux action that should be handling the request looks like this:export const updateUser = (userId: string, data: any) =>...
View ArticleAnswer by Misha Krul for Getting an undefined body in express PUT request
I figured it out.I needed to pass express.json() as an argument when calling the user controller endpoint.api/src/routes/user.ts:router.put("/api/user/:userId", express.json(),...
View ArticleAnswer by Misha Krul for undefined body in PUT request
I figured it out.I needed to pass express.json() as an argument when calling the user controller endpoint.api/src/routes/user.ts:router.put("/api/user/:userId", express.json(),...
View Articleundefined body in PUT request
I have a React / Redux / Node app that is making a request to update a user:client/src/components/pages/AlignmentPage.tsx:const AlignmentPage = () => { const dispatch = useAppDispatch(); const...
View ArticleType mismatch of "root reducer"
In my Redux store, I am initializing a persistedReducer which takes the redux-persist config and "rootReducer":client/src/redux/store.ts:import { configureStore } from '@reduxjs/toolkit';import {...
View ArticleProperty 'user' does not exist on type WritableDraft
I have a redux userSlice that is attempting to get user data from the store.client/src/redux/features/userSlice.tsimport { createAsyncThunk, createSlice, PayloadAction } from "@reduxjs/toolkit";import...
View ArticleTypescript not recognized in VSCode
I'm working on a new NextJS project w/ Typescript and Tailwind CSS. I'm working on Mac Ventura 13.3.1.I am importing dummy used data via the jsonplaceholder API.In my users/page.tsx component, I am...
View ArticleRails 7 importmap with bulma and jquery
I'm having trouble getting Rails 7 importmaps to play nicely with jquery and bulma.config/importmap.rb:pin "application", preload: truepin "@hotwired/turbo-rails", to: "turbo.min.js", preload: truepin...
View ArticleowlCarousel is not a function in rails app
I have a rails app where I'm attempting to use an owl carousel to display a list of testimonials with images. I think I have everything set up correctly, but I'm still receiving a console error that...
View ArticleAnswer by Misha Krul for Rails ActionView::MissingTemplate, Template Is...
Figured it out.I tried regenerating the mailer via bundle exec rails generate mailer contact_us and noticed that it created a mailer at app/mailers/contact_us_mailer.rb .. My original mailer was...
View ArticleRails 7 flash errors not displaying in application.html.erb
Having an issue in my Rails 7 app of alerts not showing up.notices, however, are.I am displaying alerts in application.html.erb using <%= alert %><%= render partial: "shared/navbar"...
View ArticleDisplaying different images on an HTML canvas according to selected radio button
Using this project, you are supposed to be able to select a radio button for a specific color, click the big blue button, and a corresponding 150x150px color swatch will be drawn on an HTML canvas....
View ArticleA regex to get any price string
I need to get the price from a string, but no other numbers. There are no restrictions on what the string can say, but it will always have a dollar amount in it. It's the dollar amount I need to get...
View ArticleReverse proxy CORS Configuration for NGINX
I have a nodejs server and react client app deployed to an ec2 instance. When I try to send a POST request to /api/emails route it returns a CORS / CORB error in the console.Cross-Origin Request...
View Articlerouting error, no route match for rails api request
I've got my controller namespaced with API, and can't seem to make a request due to the following error:ActionController::RoutingError (No route matches [GET] "/api/request_projects")Controller:module...
View Articlestreaming a remote image to the buffer using Koa
First time playing around with nodejs streams.. I feel like I'm missing something fundamental here about how streams work. When I make the request to the URL it logs out a 404. If I try to write to the...
View Article