Giter Site home page Giter Site logo

Comments (12)

yriiarutiunian avatar yriiarutiunian commented on May 15, 2024 1

Ok. Thank you. there's one more star from me, man!

from rpc-websockets.

mkozjak avatar mkozjak commented on May 15, 2024

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.

yriiarutiunian avatar yriiarutiunian commented on May 15, 2024

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.

mkozjak avatar mkozjak commented on May 15, 2024

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.

yriiarutiunian avatar yriiarutiunian commented on May 15, 2024

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.

mkozjak avatar mkozjak commented on May 15, 2024

from rpc-websockets.

yriiarutiunian avatar yriiarutiunian commented on May 15, 2024

$ npm -v
6.4.1

$ node -v
v10.15.0

from rpc-websockets.

mkozjak avatar mkozjak commented on May 15, 2024

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.

yriiarutiunian avatar yriiarutiunian commented on May 15, 2024

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.

mkozjak avatar mkozjak commented on May 15, 2024

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.

yriiarutiunian avatar yriiarutiunian commented on May 15, 2024

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.

mkozjak avatar mkozjak commented on May 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.