ubuntu16.04 from the installation of vue to the success of vscode running the project, a series of problems occur and solve the process

After installing vue,
/usr/bin/env: "node": there is no such file or directory
sudo ln -s /usr/bin/nodejs /usr/bin/node
, there is another problem
let session = require('express-session' );
^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object. Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module. js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/qubianzhong/workspace/antzb-operate/operate-backend/bin/www:7:11)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
upgrade nodejs, finally completed the first page of vue run
git clone project completed, code. Open project .
cnpm install
cnpm run dev
shows incorrect ip
building modules 1/1 modules 0 activeevents.js:298 throw er; // Unhandled 'error' event
modified ip address, and another problem occurred
Error: listen EADDRNOTAVAIL: address not available 192.168.1.56 :8090
changed the export to its own ip address
export HOST=192.168.1.132
to count as a successful project.

 

Guess you like

Origin blog.csdn.net/yn7901/article/details/104611124