Comments (6)
Hey @MickL, could you provide me the call stack of your error and your devDependencies
?
What version of gulp-browserify
were you using?
from gulp-bro.
It seems like gulp-bro only accepts JavaScript files as src, but it would be very inconvenient to compile TS to JS, save the unbundled JS files, and start gulp-bro in a separate task.
gulp-browserify: 0.5.1
Hope you are looking for this:
Error: Cannot find module '/Users/[...]/src/scripts/main.js' from '/Users/[...]/src/scripts'
DestroyableTransform {
_readableState:
ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { length: 0 },
length: 0,
pipes: null,
pipesCount: 0,
flowing: null,
ended: false,
endEmitted: false,
reading: false,
sync: false,
needReadable: true,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
destroyed: false,
defaultEncoding: 'utf8',
awaitDrain: 0,
readingMore: false,
decoder: null,
encoding: null },
readable: true,
_events:
{ end:
{ [Function: bound onceWrapper] listener: [Function: onend] },
prefinish: [Function: prefinish] },
_eventsCount: 2,
_maxListeners: undefined,
_writableState:
WritableState {
objectMode: false,
highWaterMark: 16384,
finalCalled: false,
needDrain: false,
ending: false,
ended: false,
finished: false,
destroyed: false,
decodeStrings: true,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: true,
bufferProcessing: false,
onwrite: [Function],
writecb: null,
writelen: 0,
bufferedRequest: null,
lastBufferedRequest: null,
pendingcb: 0,
prefinished: false,
errorEmitted: false,
bufferedRequestCount: 0,
corkedRequestsFree:
CorkedRequest { next: null, entry: null, finish: [Function] } },
writable: true,
allowHalfOpen: true,
_transformState:
{ afterTransform: [Function: bound afterTransform],
needTransform: false,
transforming: false,
writecb: null,
writechunk: null,
writeencoding: null },
_destroyed: false,
_transform: [Function: noop] }
from gulp-bro.
Thanks for the info. Could you dump your old gulp recipe when you were using browserify
?
from gulp-bro.
Its the same but call gulp-browserify instead of gulp-bro
from gulp-bro.
@MickL I'm not very familiar with TypeScript, but after taking a closer look, it seems from your example that you actually don't need bro
(or browserify
).
From the official TypeScript recipes you can:
So if you really want to use browserify
, you would need to remove your gulp-typescript
, install tsify
and do something like:
return gulp
.src('./src/**/*.ts')
.pipe(sourcemaps.init())
.pipe(bro({ plugin: ['tsify'] }))
.pipe(sourcemaps.write())
I'm closing it as it's probably not a gulp-bro
bug, but a configuration problem. Feel free to re-open if you think otherwise.
from gulp-bro.
Actually i want to use gulp-bro in bei gulp-process as i use gulp-browserify. The problem with gulp-browserify is it is deprecated, has no treeshaking etc as you described in your readme.
The problem seems to be simple, gulp-bro is looking for exisiting js files on my harddrive but actually they are in memory inside of the gulp-process.
from gulp-bro.
Related Issues (20)
- How to add plugin with options HOT 2
- Unable to use global transforms. HOT 2
- Browserify incremental cache not working HOT 1
- Support for multiple bundles HOT 8
- Rollup support HOT 7
- Single Bundle File? HOT 1
- Remove gulp-util (deprecated) HOT 3
- How to rename destination file? HOT 1
- Using with browserify-shim HOT 2
- Excluding a module HOT 1
- ParseError: Unexpected token HOT 1
- React and jsx scripts not getting compiled on windows 10 HOT 2
- update browserify to version 16 HOT 3
- Creating a bundle using multiple entry files HOT 1
- Update gulp-bro away from @babel/polyfill to use core-js natively HOT 6
- Error: Cannot find module @gulp-sourcemaps HOT 1
- Cache is not properly working HOT 1
- How do I make errors fatal, causing gulp to fail HOT 1
- Gulp-bro doesn't seem to work on stream, but on files?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gulp-bro.