All Questions
2,626
questions
0
votes
0
answers
15
views
Webpack complied with 1 error when i try to npm run dev [closed]
I am doing a course on javaScript in udemy. It is first time i am using things like webpack and babel , in my final step of project setting when i try to do npm run dev . I get this error
C:\Users\...
0
votes
0
answers
41
views
Appropriate loader to handle this file type .mjs | webpack
I recently added @radix-ui/react-navigation-menu to my project. However, upon attempting to rebuild, I encountered the following error message: the error..
Interestingly, other components from the ...
0
votes
0
answers
35
views
Uncaught runtime errors: ERROR process is not defined
My npm start has about 58 errors, almost all of them in webpack.config.js. Now, when I stop Ctrl-C and restart (npm start), my browser shows the pictures below. I've stopped and restarted my back end ...
1
vote
0
answers
21
views
Dynamic import of package in my NPM library
Hej. I have dynamic import of animation library lottie in my component like:
const { default: lottie } = await import(
/* webpackChunkName: "lottie-web" */ "...
0
votes
0
answers
26
views
Why is my image not loading properly in my NPM React Package
I am developing a React component library for a Phone Frameset that holds screenshots of apps.
I'll provide the files with the project structure right now. Maybe the issue is from one of the config ...
0
votes
1
answer
207
views
using NPM to create React App: BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case
So for the past week or so I have been working on a project, a website for people who are fans of the band Gorillaz. I'm doing this project to fulfill the requirements of a Front End Engineering ...
0
votes
0
answers
14
views
"Avatar" is not exported by "../avatarium/dist/main.js" even though it is?
https://github.com/sfreifeld/avatar-testing
Ok I have been playing with this all day and can't figure it out. I'm new to programming in general, but this is my first attempt with Typescript and with ...
0
votes
0
answers
18
views
How to add typing for a file extension in a npm package?
I'm writing a webpack loader which for the example here processes *.foo files. I want to create typescript typings for it as follows:
// index.d.ts
declare module "*.foo" {
const bar: ...
0
votes
0
answers
90
views
Vue: Cannot find module or its corresponding type declarations
I created an NPM package project: npm , Github
It is used to automatically upload to the server through SSH after the build is completed. I want to imitate the unplugin-auto-import package and use ...
0
votes
0
answers
42
views
Why is CSSnano running in my project, even though not installed?
In my project I don't have cssnano installed anymore, but every time I run the webpack build, it still distributes the files (and I mean all files) like they're being minified by cssnano. This happens ...
0
votes
0
answers
41
views
How do I use require.context in a React Native app to dynamically import images?
I'm trying to dynamically import images from a package which is installed in my project. This package has a folder full of .png files. I tried doing this to import them dynamically:
export const ...
0
votes
1
answer
81
views
Problem with "TypeError: Cannot read property 'useState' of null" in React Library - Create NPM Package
I want to create a local npm package containing some React components called myscript-package.
./package.json
{
"name": "pack-script",
"version": "0.1.0",
...
0
votes
0
answers
24
views
How to split a css from a .scss mobile first using Webpack and Laravel Mix
Good morning. This is the code in my webpack.mix.js:
let mix = require("laravel-mix");
require("laravel-mix-compress");
mix.setPublicPath("assets");
mix
.sass("...
-1
votes
1
answer
47
views
Why do I get webpack errors when I add `@googleapis/docs` to my project?
When I add the following...
import {docs} from "@googleapis/docs";
"@googleapis/docs": "^3.0.2",
I get the following
Module not found: Error: Can't resolve 'buffer' in '/...
0
votes
1
answer
96
views
Trouble using stockfish.js with typescript
I ran npm install stockfish and have the following simple file getBestMove.ts
import stockfish from 'stockfish';
const fen = '3r1r1k/pp2Nqbp/3Rb2p/2P1pp2/7P/N1P3P1/PP2QP2/R3K3 w - - 2 30'
interface ...