Questions tagged [browserify]
Browserify is a tool that packages Node.js modules for a web browser.
2,957
questions
-1
votes
0
answers
15
views
I am trying to access a file and make changes to it. are there any alternatives to fs that are compatible with browserify? [closed]
I am trying to make a private server messaging application that takes input from <textarea> & <input> tags and then updates the contents of a separate html file contained in an <...
0
votes
1
answer
34
views
How do I use browserify/parcel with express?
This will be a long one so bare with me, I've had this code for my dapp that used a couple of libraries imported and a .json build file for my solidity contract, the first few lines looked like this
...
1
vote
0
answers
79
views
how to implement the Smartsheet API client-side code using Browserify?
"Could you please guide me on how to implement the Smartsheet API client-side code using Browserify? I am trying to use the Smartsheet API in my web application, and I am not sure how to proceed ...
1
vote
3
answers
90
views
How to use a node module in a browser with Sveltekit?
I am learning javascript and svelte and I have found a module that I want to use. The issue is that the module is built for node, so I can't directly use it on client side with require('number-to-...
0
votes
1
answer
41
views
How to use html-minifier module in browser?
I just want to use function from html-minifier in the browser.
I have tried using Browserify to make bundle using these commands:
browserify -r html-minifier -o html-minifier.js
browserify -r html-...
0
votes
0
answers
52
views
.NET CORE with Node.js and webpack or browserify
For days I am trying to make .NET CORE work with node. I tried webpack and browserify and nothing works.
The interesting thing is I can see my function definition in the resulting webpack javascript ...
0
votes
1
answer
25
views
How to import lz4 in the Svelte
My Problem is:
I want to use the lz4 library in Svelte without Svelte/kit only in the browser.
I know in the docs that they use the require syntax, but it doesnt work.
Because I can only use the ...
-1
votes
1
answer
35
views
Issue converting from ES6 module
i've did the following script which allows me to upload an image on NFT.Storage ipfs server and retrieves the img url.
import { NFTStorage, File } from "nft.storage"
import { mime } from &...
0
votes
0
answers
65
views
browserify returns visitor[(override || node.type)] is not a function
i am running the browserify via command line
browserify src/crypto/Mnemonic.js -p esmify --standalone mnembundle > src/bundle/MnemonicBundle.js
but i receive this error:
Error: Parsing file C:\...
0
votes
0
answers
36
views
Using Browserify on Node.js file gives "Listener argument must be of type function" error
I am using an npm package (steam-market-search) because I want to make a project to search for items on the steam market and show their price/image/volume etc. I want to make this a website but the ...
0
votes
0
answers
40
views
How to use node module that browser doesn't support in Angular app
I want to use webtorrent module in browser. Browser doesn't support that module natively. So I tried to use browserify to fix this problem, but I am just running on bunch of errors.
I used tsify to ...
-1
votes
1
answer
85
views
Uncaught Error: Cannot find module 'xlsx'
I am trying to see a log of the excel tab called UK in my excel sheet called Artists however it doesn't seem to be working.
I've tried to follow youtube videos and online, but I'm stuck as none of ...
0
votes
1
answer
177
views
Browserify:Can't walk dependency graph: ENOENT: no such file or directory error
Browserify:Can't walk dependency graph: ENOENT: no such file or directory error,
facing this issue while im trying to bundle my index.js which contains express and mongoose so that i can avoid ...
1
vote
1
answer
361
views
is there a browserify for vite? how can I use webrtc-swarm with a vite based project?
The title about says it. To use webrtc-swarm I believe that you need browserify -- Buffer is needed to be globally defined, and although there is a handy replacement, it won't load in time to resolve ...
0
votes
0
answers
17
views
using puppeteer in chrome extension using browserify [duplicate]
I am trying to use puppeteer in my chrome extension using browserify. when I try to bundle the file it is giving me error Error: Can't walk dependency graph: Cannot find module 'puppeteer-core/...
0
votes
0
answers
155
views
Port polyfill config from CRA to Vite config
I have an older small CRA app that I migrate into Vite React. I am almost ready, I just need to port my old override config from CRA into my new Vite React app. This seems to be a bigger struggle than ...
0
votes
0
answers
98
views
Browserify not working Uncaught TypeError: Cannot read properties of undefined (reading 'split')
I am attempting to use Browserify to be able to run my javascript in the browser since it requires an npm dependency, the code is pretty simple so far:
const translate = require('translate-google')
...
0
votes
0
answers
58
views
Unable to use node-cron to schedule a task in javascript
So I have built a website on which I'm trying to run a script to schedule a task to run at 12am every night. Since I can't use require(), due to the fact that I am running a web server, I am using ...
0
votes
0
answers
13
views
Cannot find module '@types/react' from '@types/_fake.js'
I had installed @types/react in a vendor package but when bundling using browserify I see the below error,
Cannot find module '@types/react' from '@types/_fake.js'
0
votes
1
answer
23
views
client-side TypeScript gives error: <object>.default is not a constructor
My current project contains code which runs in the browser. The code is written in TypeScript and transpiled to js using this tsconfig:
{
"compilerOptions": {
"target": "...
0
votes
0
answers
47
views
Browserify a single React Component
In my React app, I need to use microphone-stream and websocket-stream which are NodeJs npm modules, however, I only need to use these in a single component, so I don't want to use Browserify to bundle ...
0
votes
0
answers
47
views
How to use a NodeJS npm package with React JS
I am trying to use the websocket-stream npm package with React to stream mic audio through a websocket, but it is implemented using NodeJS core modules, so the documentation recommends using ...
0
votes
0
answers
46
views
document.getElementByID doesn't work when using browserify
I have a file which finds an select element and then sets the function for it's onchange. However, this doesn't work with the file browserify outputs.
Here is a minimum reproducible sample:
A select ...
0
votes
0
answers
86
views
"Uncaught ReferenceError: require is not defined" after browserify [duplicate]
sorry i'm a complete neoobie in this but in a chrome extension I try to use puppeteer in my background.js like:
const puppeteer = require('puppeteer');
and the background.js is in my manifest.json ...
2
votes
0
answers
68
views
Browserify babelify ParseError: 'import' and 'export' may appear only with 'sourceType: module'
Hi I am trying to us babelify and browserify to bundle my js files. Though once I add the keyword import into the file I get the following error
export * from '@firebase/auth'; ^ ParseError: 'import' ...
0
votes
0
answers
69
views
multiselect dropdown select2 not working with sweetalert2 and browserify
I have sweetalert2 with browserify and I want to add multiselect dropdown select2 in sweetalert2 but it is not working
Swal.fire({
title: "Multiselect",
position: 'center-end',
...
0
votes
1
answer
47
views
Trying to pull fetched data out of Browserify bundle
I am new to Browserify/Node.js and I have been trying to use npm to pull data. My code for pulling the data in one js file, main.js, is:
const { getChart } = require('billboard-top-100');
var ...
0
votes
0
answers
44
views
trying to connect html and js file with browsify ,but getting this error "not a function at HTMLButtonElement.onclick"
I was trying to connect my smart contract to frontend with two file index.html and index.js . As the require () in javascript is not readable for browser I used bundle. Using bundle I mapped index.js ...
1
vote
0
answers
108
views
Am I including npm modules in my chrome extension correctly?
I'm working on a chrome extension that grabs data from Rate My Professor's GraphQL API using the @mtucourses/rate-my-professors module, and then putting that rating on my universities courses portal. ...
0
votes
0
answers
31
views
Instantiate object from browserify-bundled NPM package in JavaScriptCore in Swift
I have bundled up an NPM package using Browserify. Then, I import it into Swift
guard let npmPackage = Bundle.main.path(forResource: "mynpmpackage", ofType: "js") else {
...
1
vote
0
answers
13
views
Avoid testsuite embedding code-under-test with browserify
I have inherited a project whose tests are compiled (with babeljs-7) from ES6 to ES5 first, then bundled (with browserify) into a huge .js file, which is then run under PhantomJS. Unfortunately, I ...
1
vote
0
answers
53
views
Browserify cannot find module has been installed from local filesystem
I have several JavaScript files that requires several modules that are managed by NPM. I am trying to bundle these files together with Browserify. However, I am getting the following error:
Cannot ...
0
votes
0
answers
44
views
tls-browserify preventing Next build from running
Whenever I try to run next build it's failing due to webpack errors which from the stack trace is being thrown is coming from the tls-browserify (which my application depends on) library due to it ...
1
vote
0
answers
464
views
'async_hooks' cant be found
I'm trying to bundle my js file with browserify and babel: browserify ./src/background.js > ./dist/bundle.js -t babelify
The full error message I get is: Error: Can't walk dependency graph: ENOENT: ...
0
votes
0
answers
51
views
Fail to bundle node ssh2 with webpack/browserify
I am currently trying to build a Chrome extension that uses ssh to connect to a server. I am currently using the ssh2 node module, but when I fail to bundle it using browserify.
I found this thread ...
0
votes
1
answer
96
views
Stream module error when using Browserify
Problem
When trying to build my bundle.js file, I get the following:
Error: Can't walk dependency graph: ENOENT: no such file or directory, lstat 'C:\[filepath&filename]\stream'
required by C:\...
0
votes
0
answers
52
views
grunt-browserify error - utf8 is not a function while parsing file
grunt browserify task is defined like this inside Gruntfile.js
browserify: {
infra: {
options: {
browserifyOptions: {
debug: ...
0
votes
0
answers
55
views
Uncaught TypeError: Class constructor ImageSource cannot be invoked without 'new' - with TS, Browserify
I have a TypeScript file that default-exports a class called Source that extends an abstract class ImageSource. It is then run through browserify with --standalone. When I paste the code into node, ...
0
votes
0
answers
33
views
How to deploy a budo/browserify project's build to GitHub Pages?
I want to deploy a clone of this Virtual Art Gallery project to GitHub Pages.
However, I'm only able to deploy the base html site rather than the build site which shows a 404 page on GitHub.
Steps I'...
-1
votes
1
answer
177
views
Uncaught ReferenceError: require is not defined javascript error
This question is very common one, however none of the solution had worked for me.
I am trying to use "require" to file system module but I keep runnig to this error.
Uncaught ReferenceError: ...
0
votes
0
answers
75
views
Browserify can't find a dependency that is already included in node_modules
I am writing a gulpfile.js in order to get a directory ready for production. My project is written in typescript, I use node 12.16.3, browserify 17.0.0, gulp 4. My code is gulpfile is:
`
const gulp = ...
0
votes
0
answers
92
views
Require is not defined with selenium webdriver and broswersify does not appear to be not an option. How can I proceed?
My question relates to implementing the solution proposed in this post. The error I first get is that the webdriver is not defined. For that, I tried the following solution. But at that point, I get ...
0
votes
0
answers
12
views
Get file names in a folder from the client app?
Using fs library in the client app built with parcel doesn't work so const filenames = fs.readdirSync(partialsDir); won't do a thing. I have found that there is browserify-fs library that should do ...
0
votes
0
answers
25
views
Babel with Browserify code transpilation showing error
I'm working on a Cordova project that shares the same codebase for the electron and android platforms.
It uses some external packages such as JQuery, Realm etc. I have imported them using require(). ...
0
votes
0
answers
163
views
i tried doing browserify script.js > bundle.js and i got this error
Error: Can't walk dependency graph: Cannot find module 'C:\Users\Paul\3d objects\projects\JavaScirpt Fundamentals\npm\lineear-gradrient-bg-generator\script.js' from 'C:\Users\Paul\3d objects\projects\...
0
votes
0
answers
72
views
Replace React imports with window.React
I use Gulp + Babel to transpile a plugin I'm making to be used in another project.
The "project" uses React, instantiated in window.React.
In my "plugin", I use NPM components that ...
0
votes
0
answers
75
views
How to bundle typescript project that imports d3js for the browser
I have an npm package which is compiled using typescipt It used d3js:
package.json:
{
"dependencies": {
"@types/d3": "^7.4.0",
"d3": "^7.6.1"
}
main....
1
vote
1
answer
83
views
Browserify version of Nodejs form-data throws error when appending buffers and streams
I am trying to create a FormData object in my browserified code. However, it is not working the same way it did in NodeJS. Here is my code:
let body = {
type: "Introductory",
...
0
votes
0
answers
95
views
webpack < 5 used to include polyfills for node.js on socket.io ionic angular
I was implementing the socket.io in my ionic application using angular, at the time of putting the server to work, I get these problems with the socket.io and webpack modules, I was looking at other ...
1
vote
0
answers
187
views
Typescript/gulp/browserify: 'import' and 'export' may appear only with 'sourceType: module'
I'm building a project that's using Typescript, Gulp, Browserify, PIXI and GSAP. I have a gulp task that's bundling the files together:
module.exports.bundleTS = function(callback){
console.log(&...