Comments (7)
@rlee1990 Can you provide a simple repo to present this error?
from isomorphic-ws.
@heineiuo there is no repo because it won't compile. You can just type ram.sh/ the package name in the web browser and you will see the error
from isomorphic-ws.
It looks like esm.sh does not respect peerDependencies
or there maybe some arguments to support peerDependencies
.
from isomorphic-ws.
It looks like esm.sh does not respect
peerDependencies
or there maybe some arguments to supportpeerDependencies
.
Any way to get around this or to get it all working?
from isomorphic-ws.
Any update @heineiuo
from isomorphic-ws.
apparently due to the fact that the library does not have an exported file for esm and an error occurs
from isomorphic-ws.
To address this problem:
- create an ESM compatible version node.mjs file:
"use strict";
export * from 'ws';
- Update the package.json file to replace:
"browser": "browser.js",
with:
"exports": {
"browser": "./browser.js",
"import": "./node.mjs",
"require": "./node.js"
},
then add the new node.mjs file in the "files" section.
from isomorphic-ws.
Related Issues (18)
- ws should be a peer dependency HOT 2
- Doesn't work in a react development environment HOT 3
- Can't construct WebSocket HOT 5
- Error: 'WebSocket': The subprotocol '[object Object]' is invalid.\n at RPC.createSocket HOT 1
- Export ES modules HOT 2
- plans for ws 8.x? HOT 2
- Add support for normal "ws" events HOT 1
- Make export interface for NodeJS and browser the same HOT 2
- It's alive? 😟 HOT 2
- The `ws` module no longer exposes the standard API for onmessage/onclose events HOT 2
- Export ClientOptions from 'ws' HOT 10
- Version 5.0.0 fails when used with typescript and karma
- Please export Websocket
- Consider marking the `ws` peer dependency as optional
- Way to compile without error HOT 4
- LICENSE HOT 1
- TypeScript supporting? HOT 11
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 isomorphic-ws.