Categories
Mastering Development

You may need an appropriate loader to handle this file type, currently no loaders are configured to process file

I just created a project using create-react-app (in javascript). In that, I am linking one of my other repository like this { "name": "hh-frontend-example", "version": "0.1.0", "private": true, "dependencies": { "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", "@testing-library/user-event": "^7.1.2", "hh-stylesheet": "file:../hh-stylesheet", "react": "^16.13.1", "react-dom": "^16.13.1", "react-scripts": "3.4.1" }, Here notice this line: "hh-stylesheet": "file:../hh-stylesheet", Now, When I start […]

Categories
Mastering Development

reactjs application – can’t get my hello world to show up

Background / Problem I’m trying to build understand my first react/webpack/nodejs app. I am able to build / launch it by opening a browser and navigating to http://localhost:3333/ , but the hello world message I’m expecting is not showing. Instead I think it’s trying to give me a directory listing of a folder…? Not too […]

Categories
Mastering Development

How to fix Next.js Vercel deployment module not found error

My next.js app works on my machine and was working when deployed on Vercel but now it fails when building on Vercel with the following error: I’ve tried deleting node_modules and running npm install a few times but with no joy. Any help would be hugely appreciated. Thank you! Analyzing source code… 21:30:52.642 Installing build […]

Categories
Mastering Development

Error 401 while reloading Jwt secured spring Boot React app (and configuration problems)

I’m learning spring boot and react. I have successfully learnt how to use the frontend maven plugin to combine the two. Also JWT kind of works (at least an api call returns what I want while the token is alive and returns error when i set quick expiration time). But react routes work weirdly. I […]

Categories
Mastering Development

My react app on heroku opens home page but will not open other pages

My react app runs fine locally, and deploys to heroku. However, from the home page, any link to another page shows a blank page with ‘not found’ on it. There are no other error messages. Here is my server-side package.json file: { “name”: “portfolio-generator”, “version”: “1.0.0”, “description”: “”, “main”: “server.js”, “engines”: { “node”: “12.16.x” }, […]

Categories
Mastering Development

npm start does nothing on windows

When I try to run npm start just after creating application with npx create-react-app, it does anything and exits with code 0. When I try to execute npm start command, I get the following message: C:\projects\novo-curriculo\ui>npm start > novo-curriculo-ui@0.1.0 start C:\projects\novo-curriculo\ui > react-scripts start When I enable –verbose options, I receive the following logs, which […]

Categories
Mastering Development

Deploying personal github pages (React App) just shows Readme

I’m trying to deploy a user-github page at username.github.io. So not a project page. However, after following steps online, I’m met with just the readme.md. The existing questions about problems releated to this are for github pages (username.github.io/someproject), whilst this is just for username.github.io. Procedure npm install gh-pages –save-dev in package.json: “homepage”: “https://myusername.github.io”, “name”: “homepage”, […]

Categories
Mastering Development

Heroku Error Code H10 – cannot get app to load, no solution seems to work

I’m having what seems to be a common issue with heroku deployment, but have searched for hours over multiple days for a solution on stackoverflow and other online resources and with mentors and nothing has worked. This is the error code I’m getting: 2020-05-14T01:20:34.309134+00:00 heroku[web.1]: State changed from starting to crashed 2020-05-14T01:26:51.177016+00:00 heroku[router]: at=error code=H10 […]

Categories
Mastering Development

I can’t seem to be able to use hooks in react

I’m starting a new react app. So far, nothing weird has been added. This is how my package.json looks like: { “name”: “client”, “version”: “0.1.0”, “private”: true, “dependencies”: { “@testing-library/jest-dom”: “^4.2.4”, “@testing-library/react”: “^9.3.2”, “@testing-library/user-event”: “^7.1.2”, “axios”: “^0.19.2”, “bootstrap”: “^4.4.1”, “fibers”: “^5.0.0”, “jquery”: “^3.5.0”, “moment”: “^2.24.0”, “node-sass”: “^4.14.0”, “popper”: “^1.0.1”, “react”: “^16.13.1”, “react-bootstrap”: “^1.0.1”, “react-dom”: “^16.13.1”, […]

Categories
Cryptocurrency Ethereum Mastering Development

Deploy contract with web3 with ABI in JSON file give me “SyntaxError: Unexpected token o in JSON at position 1”

I got problem with my deploy.js script to te deploy my smart contract with web3. When I run it, I always got this error: Attempting to deploy from account XXXXXXXXXXXXXX (node:25929) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token u in JSON at position 0 at JSON.parse (<anonymous>) at deploy (/louis/ethereum/deploy.js:16:53) at process._tickCallback (internal/process/next_tick.js:68:7) (node:25929) UnhandledPromiseRejectionWarning: Unhandled promise rejection. […]