Comments (12)
Ok. Thank you. there's one more star from me, man!
from rpc-websockets.
Hello,
Build it with npm build
and check the dist
directory for browser files. Also check https://github.com/elpheria/rpc-websockets/tree/master/dist
from rpc-websockets.
I got this after I run build
$ npm run build
[email protected] build C:\Users\me\Documents\tmp\rpc-websockets
mkdir -p ./dist && eslint --fix -c ./.eslintrc './src//*.js' './test//*.js' && babel ./src -d ./dist && browserify -s RPCWebSocket ./dist/index.browser.js > ./dist/index.browser-bundle.js
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: mkdir -p ./dist && eslint --fix -c ./.eslintrc './src/**/*.js' './test/**/*.js' && babel ./src -d ./dist && browserify -sRPCWebSocket ./dist/index.browser.js > ./dist/index.browser-bundle.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\me\AppData\Roaming\npm-cache_logs\2019-01-17T19_25_41_449Z-debug.log
from rpc-websockets.
For me it worked correctly:
> [email protected] build /private/tmp/rpc-websockets
> mkdir -p ./dist && eslint --fix -c ./.eslintrc './src/**/*.js' './test/**/*.js' && babel ./src -d ./dist && browserify -s RPCWebSocket ./dist/index.browser.js > ./dist/index.browser-bundle.js
src/index.browser.js -> dist/index.browser.js
src/index.js -> dist/index.js
src/lib/client/websocket.browser.js -> dist/lib/client/websocket.browser.js
src/lib/client/websocket.js -> dist/lib/client/websocket.js
src/lib/client.js -> dist/lib/client.js
src/lib/server.js -> dist/lib/server.js
src/lib/utils.js -> dist/lib/utils.js
Try doing rm -rf node_modules && npm i
preventively.
from rpc-websockets.
No, it wouldn't work for me.
Maybe there's something I do wrong during the install process.
Here it is:
$ git clone https://github.com/elpheria/rpc-websockets.git
$ cd rpc-websockets
$ npm i
$ npm run build
from rpc-websockets.
from rpc-websockets.
$ npm -v
6.4.1
$ node -v
v10.15.0
from rpc-websockets.
Works for me with those. Try running all of these commands manually, each one separated:
mkdir -p ./dist
./node_modules/.bin/eslint --fix -c ./.eslintrc './src/**/*.js' './test/**/*.js'
./node_modules/.bin/babel ./src -d ./dist
./node_modules/.bin/browserify -sRPCWebSocket ./dist/index.browser.js > ./dist/index.browser-bundle.js
See where it fails.
from rpc-websockets.
the last one went wrong.
this is what it says:
$ ./node_modules/.bin/browserify -sRPCWebSocket ./dist/index.browser.js > ./dist/index.browser-bundle.js
Error: --standalone requires an export name argument
at error (C:\tmp1\rpc-websockets\node_modules\browserify\bin\args.js:110:17)
at module.exports (C:\tmp1\rpc-websockets\node_modules\browserify\bin\args.js:242:9)
at Object. (C:\tmp1\rpc-websockets\node_modules\browserify\bin\cmd.js:8:26)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:283:19)
from rpc-websockets.
Can you give me an output of this?
cat package.json| grep build
Also, I pasted the last line wrong. Should be ...browserify -s RPCWebSocket...
from rpc-websockets.
yes, i can. here it is:
$ cat package.json | grep build
"build": "mkdir -p ./dist && eslint --fix -c ./.eslintrc './src//*.js' './test//*.js' && babel ./src -d ./dist && browserify -s RPCWebSocket ./dist/index.browser.js > ./dist/index.browser-bundle.js",
"pretest": "npm run-script build",
but now it gives NO ERROR after I do the last line right,
from rpc-websockets.
Ok, might be that your package.json was messed up. Look at the comment where you posted the npm run build
line with an error. You had browserify -sRPCWebSocket
in it.
from rpc-websockets.
Related Issues (20)
- Publish 7.4.13 to NPM HOT 1
- How to get the Emit response ?
- Dependency Vulnrabilities HOT 3
- Ignore null in result/error HOT 2
- Help! Run ws on the same port as a http Express? HOT 2
- Access connected clients HOT 4
- Is this the proper way to close the socket? HOT 1
- The Map type cannot be returned using the Server registration method HOT 2
- `fn` type bound in `Server.register` might be slightly off HOT 2
- Migrate from request
- Resolve tough-cookie vulnerability
- How to handle exceptions on server? HOT 3
- Q: namespaces HOT 1
- process is hanging after calling client.close HOT 3
- Whether there is an interest in providing an extensible encoder and decoder? HOT 5
- call results in -32602 Invalid params when no params are given cause it sents null HOT 3
- When sents message without params it is ignored HOT 1
- Any reason emit events on namespace level will be broadcasting instead of only to subscribers like on top level HOT 1
- Sending ArrayBuffer is very awkward
- Target `esnext` when building releases
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 rpc-websockets.