Tag : javascript

The front-end encapsulates the FormData object post to the back-end nodejs. nodejs uses formidable to parse the request. Up to this point, there has been no problem. nodejs can successfully parse the request and print out the desired data. However, I wanted to send the data obtained after parsing the request to the python server ..

Read more

What does this mistake mean and how to solve it? Also please master advice: Last login: Sun Oct 16 10:11:50 on ttys000DerekdeMacBook-Pro:~ derek$ npm -v2.15.9DerekdeMacBook-Pro:~ derek$ npm install webpack -gnpm ERR! tar.unpack untar error /Users/derek/.npm/webpack/1.13.2/package.tgznpm ERR! Darwin 15.3.0npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” “webpack” “-g”npm ERR! node v4.6.0npm ERR! npm v2.15.9npm ERR! path /usr/local/lib/node_modules/webpacknpm ERR! ..

Read more

I found it on github and said it could be used.node-rtsp-streamTo transcode the video stream,According tohttps://www.npmjs.com/package …It’s written on,Inpm install node-rtsp-streamLater, execute on node Stream = require(‘node-rtsp-stream’); stream = new Stream({ name: ‘name’, streamUrl: ‘rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov’, wsPort: 9999 }); After that, it was written in js inside. client = new Websocket(‘ws://localhost:9999’); player = new jsmpeg(client, { ..

Read more

Js code: function A(x){ this.x = x ; bracket function B(y) { this.y = y; bracket B.prototype = new A(1); function C(z) { this.z = z; bracket var b = new B(2); C.prototype = new B(2); console.log(b); console.log(C.prototype); console.log(b instanceof A); console.log(C.prototype instanceof A); console.log(b.constructor); console.log(C.prototype.constructor); Print results: As shown in the figure: b and ..

Read more

this is Error: ERROR in ./app/main.jsx Module parse failed: /home/liudong/Public/proj/Homepage/app/main.jsx Unexpected token (8:7) You may need an appropriate loader to handle this file type. SyntaxError: Unexpected token (8:7) at Parser.pp$4.raise (/home/liudong/Public/proj/Homepage/node_modules/acorn/dist/acorn.js:2221:15) at Parser.pp.unexpected (/home/liudong/Public/proj/Homepage/node_modules/acorn/dist/acorn.js:603:10) at Parser.pp$3.parseExprAtom (/home/liudong/Public/proj/Homepage/node_modules/acorn/dist/acorn.js:1822:12) Json “dependencies”: { “react”: “^15.4.0-rc.4”, “react-dom”: “^15.4.0-rc.4”, “react-router”: “^2.8.1” }, “devDependencies”: { “babel-core”: “^6.17.0”, “babel-loader”: “^6.2.5”, “babel-preset-es2015”: “^6.16.0”, ..

Read more

After learning the webpack for the first time, I came across a problem, that is, I don’t want to type the code in cmd line by line to install the loader, but write it directly into the dependency of package.json, which is not only installed but also more clearly understood. however, I don’t know the ..

Read more

For example, this project:https://github.com/laihaibo/z … Implemented:npm install -g ionic@betacordovacd zhihudaily-ionic2npm installionic serve It was found that:The 1.www/build directory has not been created. How can it be successfully created?2. The. ts file in the 2.app directory has not been compiled into js file. How can it be compiled into js file? (Batch) i..

Read more

function a(b){ var b; console.log(b); //Why is the result 2 bracket a(2); function a(b){ var b = 4; console.log(b); //Why is the result 4 bracket a(2); This is the arguments and variable priority before and after the assignment is not the same? The parameters of the passed-in function are local variables of this function The ..

Read more