Comments (8)
Can you send through the require
statement you're using in your example/index.js
?
from drift.
It is using a Deku
component I am writing, but the component looks like:
import driftZoom from 'drift-zoom';
from drift.
Strange. Would it be possible for you to set up a reduced test case I can play with?
from drift.
Running npm run build
with those files:
package.json
:
{
"scripts": {
"build": "browserify --noparse=drift-zoom index.js -o test.js -dv"
},
"dependencies": {
"drift-zoom": "^0.3.4"
},
"devDependencies": {
"browserify": "^12.0.1"
}
}
index.js
:
var driftZoom = require('drift-zoom');
Results in this error:
Error: Cannot find module './util/throwIfMissing' from 'c:\x\y\drift-zoom-test\node_modules\drift-zoom\dist'
at c:\x\y\drift-zoom-test\node_modules\resolve\lib\async.js:55:21
at load (c:\x\y\drift-zoom-test\node_modules\resolve\lib\async.js:69:43)
at onex (c:\x\y\drift-zoom-test\node_modules\resolve\lib\async.js:92:31)
at c:\x\y\drift-zoom-test\node_modules\resolve\lib\async.js:22:47
at FSReqWrap.oncomplete (fs.js:82:15)
from drift.
Perfect, I'll take a look at this tomorrow. Thanks @heloyo!
from drift.
Hmmm. @heloyo, I spent a fair bit of time trying to figure out what's going on here. For some reason, Browserify seems to be ignoring(?) noParse
. I'm unclear why this is happening. In the meantime, you can change your require
to require('drift-zoom/dist/Drift.min.js')
to work around this.
from drift.
Weird bug! Changing to require('drift-zoom/dist/Drift.min.js')
worked, thanks @paulstraw.
from drift.
@jmagnusson, I think this was happening because noParse
needs the full path. Can you try it with the value of require.resolve('drift-zoom')
?
from drift.
Related Issues (20)
- document is undefined when library included in SSR application HOT 1
- The image is loading twice HOT 1
- I would like to Drift over more than one image HOT 2
- NPM package README needs to be updated HOT 2
- Demo url on readme.md file points to 404 error
- Action Required: Fix Renovate Configuration
- Content-Security-Policy blocking inline styles HOT 3
- The demo on the index.html page from the drift-main folder works very crookedly. HOT 2
- Dependency Dashboard
- Add passive option to event listeners HOT 4
- feat: lazy-load images HOT 3
- The automated release is failing 🚨
- Passive event listeners don't allow preventDefault() HOT 5
- paneContainer is moving with touch dragging HOT 4
- Is there a way to show the zoomed area around the mouse? HOT 1
- feat: add zoom right to left support HOT 6
- TypeError: driftImgs.map is not a function HOT 2
- Call for Maintainer(s) HOT 11
- Is there RTL exemple
- Documentation for usage in react? HOT 1
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 drift.