Skip to content

Instantly share code, notes, and snippets.

@xyzdata
Created July 5, 2017 05:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xyzdata/cc34c97380c4608919cde6899d2d24ff to your computer and use it in GitHub Desktop.
Save xyzdata/cc34c97380c4608919cde6899d2d24ff to your computer and use it in GitHub Desktop.
npm install error

npm install error

infinitered/ignite#46

    
# ant bugs

$ npm i -S antd

Installation Errors npm ERR! enoent ENOENT: no such file or directory, rename

npm ERR! code ENOENT npm ERR! errno -4058 npm ERR! syscall rename

@xyzdata
Copy link
Author

xyzdata commented Jul 5, 2017

Fetch API & JSON

https://github.com/github/fetch#json

https://cdn.xgqfrms.xyz/json/

let users = "";

const url = `https://cdn.xgqfrms.xyz/json/${users="users"}.json`;

fetch('https://cdn.xgqfrms.xyz/json/users.json')
.then(function (response) {
    return response.json();
})
.then(function (json) {
    console.log('parsed json', json);
})
.catch(function (error) {
    console.log('parsing failed', error);
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment