I would like to create a new Gatsby site using the instructions on https://www.gatsbyjs.com/docs/quick-start , so I ran: Note: I didn’t change any configuration, so I’m using JavaScript (instead of TypeScript), not using a CMS, not using a styling system, and installed no additional features. During running npm run develop, I’m getting the following error: Environment: I’m not sure how
Tag: webpack
Bundle multiple named AMD modules with dependencies into one JS file (building a web app extension system)
I’m working on an extension system for my web app. Third-party developers should be able to extend the app by providing named AMD modules exporting constants and functions following a predefined spec and bundled into a single .js JavaScript file. Example JavaScript bundle: In the above example module1 and module2 are extension modules (identified by the spec export) and module3
javascript error in the console that prevents the rest of the javascript from working
I’m doing a project for my courses on symfony, I use webpack and the “slidejs” library to make carousels. Everything works fine on the page where I use splide but on the other pages where it’s not used I get an error message in the console and all the rest of my javascript doesn’t work anymore Error: https://i.stack.imgur.com/x21fr.png I’m importing
Next.js – best way to serve static JS from a node module’s “dist” folder
I’m working with an application that uses Tesseract (OCR) to read text from images. I would like to take some JS files from node_modules/tesseract.js/dist and make them downloadable in the browser. I know I can just copy the files to ./public and next.js will serve it statically from there, but then if I update my version of Tesseract, I may
React index.js in Django Project doesn’t render imported components
I am trying to build a project with a hybrid architecture with Django as Backend and React as Frontend. For this I use Webpack and Babel to pipe the js files into djangos static index-bundle.js. However I encountered a problem which I don’t understand. Apparently I can not import other components into my index.js react file. Instead, the root div
How can I run a yarn app/How to run a yarn dev server?
I’ve always used just npm and never yarn/webpack explicitly. I need to run the code from this repo: https://github.com/looker-open-source/custom_visualizations_v2 Like a dev server or something to ensure it’s serving the files properly but I don’t see a “run” like npm run start. Does this just not exist with yarn? It feels like this code should work as is and I
Instagram embed: React’s JSX doesn’t support namespace tags
I was trying to embed an Instagram post on my React website but I encountered the error “Namespace tags are not supported by default. React’s JSX doesn’t support namespace tags. You can set throwIfNamespace: false to bypass this warning.” Where am I supposed to set throwIfNamespace: false. My first guess is node_modules/react-scripts/webpack.config.js. Where in webpack.config am I supposed to put
Electron “ready-to-show” event not working as expected
Here is a block of code from my application Codey. src/main.py src/docs/renderer.js When darkMode = true, toggleDarkMode is never run. My application has two different windows – an editor and a docs window. For both windows, on the “ready-to-show” event, “dark-mode:toggle” is sent to the renderer process. However, the docs window fails to run the toggleDarkMode function whilst it works
yarn workspaces and lerna cause Invalid Hook call
I think this is a duplicate React problem Current behavior : In the container project, it works fine when I route to sub-app/foo. But when I route to sub-app I get the following error : Notice: sub-app/foo will get a class component. sub-app will get a React hooks component Expected behavior: The result I expect is that the subApp code
tsx extension error in React project with Typescript
I’m trying to move my project from js to ts, so I’ve installed typescript and now I’m changing the extension of all files from .js to .tsx, then I tried to launch again the project and seems that can’t resolve .tsx files This is the folder tree of my project (Note that I just changed my Button component to .tsx