rsuite / dom-lib Goto Github PK
View Code? Open in Web Editor NEWDOM helper library
Home Page: https://dom-lib.vercel.app/
License: MIT License
DOM helper library
Home Page: https://dom-lib.vercel.app/
License: MIT License
Error below occurred while I build a vite.js react-ts project integrated with rsuite.
node_modules/dom-lib/lib/animation/nativeRequestAnimationFrame.d.ts:1:32 - error TS2304: Cannot find name 'webkitRequestAnimationFrame'.
1 declare const _default: typeof webkitRequestAnimationFrame;
I try to replace webkitRequestAnimcationFrame
with requestAnimationFrame
in nativeRequestAnimationFrame.d.ts, and then it works.
dependencies:
webpack 4.33.0; babel 7;
when npm run start . this error appear
./node_modules/dom-lib/es/query/getPosition.js
Module not found: Can't resolve '@babel/runtime/helpers/esm/extends' in '/Users/weichangyue/sunlord/产品域/psm-web/node_modules/dom-lib/es/query'
First off, rsuite looks gorgeous! Great job on the library.
I'm having trouble building rsuite with rollup, and I've traced it back to this library:
Error: 'getOffset' is not exported by node_modules/dom-lib/lib/index.js
at error (/home/fkschott/pika-monorepo/node_modules/rollup/dist/rollup.js:9408:30)
at Module.error (/home/fkschott/pika-monorepo/node_modules/rollup/dist/rollup.js:13347:9)
I believe this is because it's having trouble understanding the interface to your Common.js lib
build:
// lib/index.js
var _query = require("./query");
Object.keys(_query).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _query[key];
}
});
});
Since your source directory is written with ESM, it would be nice to build an ESM build with your package as well. This would give consumers better tree-shaking, and also help bundlers like rollup better understand the package code.
Here are a few links to help:
"modules": false
in your .babelrc and make no other changes, although that may break server-side rendering.I'm running a Remix app that does SSR on Cloudflare Pages. When running in development locally, and when building locally, things work as expected. But as soon as I deploy to Cloudflare using wrangler deploy
, I get this error. The stacktrace points to a setTimeout in requestAnimationFramePolyfill.js:
✘ [ERROR] service core:user:site: Uncaught Error: Disallowed operation called within global scope. Asynchronous I/O (ex: fetch() or connect()), setting a timeout, and generating random values are not allowed within global scope. To fix this error, perform this operation within a handler. https://developers.cloudflare.com/workers/runtime-apis/handlers/
at null.<anonymous> (7alu3beitb9.js:50167:12) in _setTimeout
at null.<anonymous> (7alu3beitb9.js:50185:5) in
../node_modules/dom-lib/esm/requestAnimationFramePolyfill.js
at null.<anonymous> (7alu3beitb9.js:9:56) in __init
at null.<anonymous> (7alu3beitb9.js:50294:5) in
../node_modules/dom-lib/esm/DOMMouseMoveTracker.js
at null.<anonymous> (7alu3beitb9.js:9:56) in __init
at null.<anonymous> (7alu3beitb9.js:62379:5) in
../node_modules/rsuite-table/es/ColumnResizeHandler.js
at null.<anonymous> (7alu3beitb9.js:9:56) in __init
at null.<anonymous> (7alu3beitb9.js:62662:5) in
../node_modules/rsuite-table/es/HeaderCell.js
at null.<anonymous> (7alu3beitb9.js:9:56) in __init
at null.<anonymous> (7alu3beitb9.js:62851:5) in
../node_modules/rsuite-table/es/utils/mergeCells.js
I believe this is happening because requestAnimationFramePolyfill(emptyFunction);
is getting called in the global scope.
I see this is a workaround for Safari 6 -- would it be OK to remove? Or perhaps move to another location so that it doesn't execute in the global scope? Thank you!
Determine whether an element is focusable using keyboard.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.