npm install –global windows-build-tools
https://www.npmjs.com/package/windows-build-tools
https://stackoverflow.com/questions/32457761/how-to-solve-node-gyp-rebuild-issue-on-windows-10
What this Error? Example:
transaction A get nonce 1
transaction B get nonce 2
transaction C get nonce 3
But blockchain package B、C first, then package A. If happen this step, get error.
With truffle? Because
Normal
const wallet = new HDWalletProvider(mnemonic, url, id); const AContract = new TruffleContract(Json_contract); AContract.setProvider(wallet); wallet.addresses[] AContract. use contract api Sometime you call contract “set/write” api two times.
Example:
Create contract first. Write data into contract second.
https://juejin.im/post/5ab3f77df265da2392364341
本地模块引用 這段不錯
Jest Expect Methods https://jestjs.io/docs/en/expect
it = test
it('count > 30', async () => { await reqTarget.get("/members").expect(200) .then((res) => { //Can use foreach, more easy for(key in res.body){ //console.log(res.body\[key\].cou ); if (res.body\[key\].cou > 100) throw new Error("count: "+res.body\[key\].cou +" > 30"); //for vars value check message expect(res.body\[key\].cou ).toBeLessThan(30); } }); });
You can do:
1. reget git clone
2. npm install
3. remove node_module
4. npm install agin
5. npm audit fix
6. npm start or run
Sometime can Run.
g++ 安全
sudo apt-get install build-essential
Why is perfacet~~ Because ONLY write one time validations then RESTFUL API can use. Front Angular Form can use.
So maybe sails.js have output Model Validations JSON
or write use jsonschema (A fast and easy to use JSON Schema validator)