"SyntaxError: Unexpected token < in JSON at position 0"

In a React app component which handles Facebook-like content feeds, I am running into an error: Feed.js:94 undefined "parsererror" "SyntaxError: Unexpected token < in JSON at position 0 I ran...

Create react app, reload not working

I just started coding in React using create-react-app. In the documentation it's said The page will reload if you make edits. I don't know which module is responsible for auto reload (webpack or...

How to use paths in tsconfig.json?

I was reading about path-mapping in tsconfig.json and I wanted to use it to avoid using the following ugly paths: The project organization is a bit weird because we have a mono-repository that...

Webpack: load images from inline style (background-image)

I have a problem with loading an image using webpack. When I use an image tag on an html page, everything works fine: <img src="../../content/images/logo.png"> But I also have a need to use...

webpack-dev-server 'Cannot GET /'

I have the following webpack config: module.exports = { entry: "./src/index.js", output: { path: __dirname + '/dist', // publicPath: __dirname + '/dist/', filename: "bundle.js" ...

Module build failed: Error: Typescript emitted no output for

When I try to compile a .ts file I get the following error: Module build failed: Error: Typescript emitted no output for C:\xampp\htdocs\node-api\src\js\server.ts. at successLoader...

Angular CLI create component throw error; Could not find an NgModule

I am working on Angular 6 application and trying to use CLI to create new component using 'ng g c myComponent' but getting error My all components are under module folder of app / (root level...

Angular Universal (SSR) Error: Failed to lookup view "index" in views directory

I want to deploy my angular universal app on aws. From my understanding, I can only deploy my app on elastic beanstalk because it needs a web server to run. (It means no S3 deployment). When I...

How to fix "FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory" error

I'm trying to deploy a reactjs application to heroku. While compiling assets, the build fails and produces this error: -----> Ruby app detected -----> Compiling Ruby/Rails -----> Using Ruby...

Copy build files to another project using webpack

I have two project folders in the same parent folder. One is for front end files (JS, CSS, images etc.) and another is for the backend files. The frontend project uses webpack to build files into...

How to call Vue components in my .cshtml pages?

I have a ASP.NET Core MVC project in conjunction with Vue.js. I am only using Vue.js to make my pages reactive. My goal is to create a main vue instance based on a div in the _layout.cshtml file...

Rails UJS link_to destroy action not working properly after migrating to webpack

I have a project with Rails/webpacker/stimulus. Today I migrated the asset pipeline to webpacker. All went fine except for one detail. Link_to buttons with a call to a destroy method direct to the...

Cannot find module '@/assets/<file-name-here>.svg'. @vue/cli Version: 4.2.3 and 4.3.1

General jist: import Image from '@/assets/default-profile-picture.svg' //ERROR: Cannot find module '@/assets/default-profile-picture.svg'.Vetur(2307) I have spent the better part of today trying...

Webpack Error - configuration.node has an unknown property 'fs'

I have encountered an error when using the latest version of Webpack (5.1.0). It looks like the configuration is throwing an error because the validation schema is too restrictive. Here is my...

Error: PostCSS plugin tailwindcss requires PostCSS 8

I installed the new tailwindcss version 2.0 and I've got the following error. I tried to uninstall postcss and tailwindcss but it does not work. Need help. Module build failed (from...

How to remove yarn packages

I followed the instructions at https://tailwindcss.com/docs/installation and https://web-crunch.com/posts/how-to-install-tailwind-css-2-using-ruby-on-rails to install tailwind as...

Webpack: Can't display SVG images with file-loader (svg parse error)

SVGs that I use using require doesn't get displayed. In my terminal, svg assets gets emitted and paths were set properly in my html. <img...

this.util.TextEncoder is not a constructor only in electron app (works in chrome)

I am creating a body segmentation app using tensorflow bodypix model. It works fine in the browser. I am using webpack to use its modules(see below) import * as wasm from...

updating webpack from version "^4.30.0" to "^5.16.0" I'm getting weird errors for path and process

I'm working on a react project and I decided to upgrade the packages to their latest stable version. but I'm getting a lot of breaking error because changes are major. but these two errors about...

Multiple layouts in NextJS or conditional css import

I'm working on moving legacy app to the Nextjs. The app has two layouts: public and admin part. Every layout has it's own css files. Because of the nextjs restrictions when you can import css only...

Why am I unable to import my component in react?

I am doing a basic import of a component and it keeps on giving me this error: ./src/Nav.js Module not found: You attempted to import...

html-loader is not getting correct img src path

(problem solved!) I am trying to use html-loader and file-loader to pack my image source which is mentioned in index.html img tag src attribute. But it's not working because the img tag src is not...

Saleor Platform running, storefront wont start the server

I've used the saleor platform method, with docker and dashboard and everything else works properly, but not the frontend, any idea how to debug this, this is the output of the last...

Error: Compiling RuleSet failed: Properties options are unknown

Having upgraded from webpack 4.46.0 to 5.45.1 I am encountering the following error during the build: Error: Compiling RuleSet failed: Properties options are unknown (at ruleSet[1].rules[6]:...

How to install CKEditor using NPM on Laravel 8 Jetstream

I'm lost in a struggle for making CKEditor 5 work in Laravel 8 Jetstream. I have installed it using npm (I don't want CDN for production mode later on). How I installed it I executed the following...

How to import CDN Vue in a plain Typescript file without Vue CLI?

I have a big project, which already is developed most of it, and I need to implement Vue.js for only some small parts in the app. For it, I am importing Vue.js with a CDN version and a <script>...

My routing with React router dom, <Route /> not working

I'm building a module federation/react aplication. I'm currently working on my container, and i've been setting up the environment for everything, including TS, now, when i try to create my...

How to use SCSS and Tailwind CSS with Storybook in Next.js

I am trying to load a global scss file into storybook, but as soon as I changed the import from .css to .scss, I got errors that ranged from @ not being recognized in the @import tailwind to ERROR...

Cannot import firebase into react.js project. "Module not found: Error: Package path . is not exported from package"

I am trying to implement firebase into my react.js project. For the sake of following instructions I am currently using firebase version 7.15.5 (at least I think because both my .json files say...

Couldn't import web3 library in react application

ERROR in ./node_modules/cipher-base/index.js 3:16-43 Module not found: Error: Can't resolve 'stream' in 'C:\Users\Sumana\Desktop\Web3\web3app\node_modules\cipher-base' BREAKING CHANGE: webpack < 5...