No repository field issue
sunn-e opened this issue · comments
sunny@sunny-VirtualBox:~/gitfolio$ npm i
npm WARN gitfolio@0.1.1 No repository field
I ran this again
$ node build --name sunn-e
I'm getting this error /home/sunny/gitfolio/build.js:3
const {updateHTML} = require('./populate')
^
SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3
What version of Node are you using?
The first error about not having a repository is fine (though we should add that in the package.json).
The actual error here seems to be your version of node not supporting the destructuring syntax. Node has supported this for a while (version 8.x I think). Make sure you have an up to date install of Node.
@imfunniee thoughts on adding a .nvmrc
file or locking supported node versions in the package.json?
Looks like most of these errors are from node v8.9 and below. We could add that but it would make it limited. 🤔
Also i think we need an issue template, if someone can PR one.
@imfunniee, I agree. Current LTS is 10.x, but we can pretty easily support older versions.
I personally see no problem with only supporting v10 and above. I could take a look and see what is causing the issue in v8 if needed, but honestly most people are using v10+ now
I'm trying to update it,
The first error about not having a repository is fine (though we should add that in the package.json).
The actual error here seems to be your version of node not supporting the destructuring syntax. Node has supported this for a while (version 8.x I think). Make sure you have an up to date install of Node.
@imfunniee thoughts on adding a
.nvmrc
file or locking supported node versions in the package.json?
this seems to be the issue. I hope others will have latest version of nodejs.
I did sudo apt-get install nodejs
sudo apt-get install node.js
Still issue persists. version remains same v4.2.6
@sunn-e, that's an extremely old version. What OS are you using and what version is it?
I'd recommend installing Node via nvm: https://github.com/nvm-sh/nvm
v4 👀
just download node from https://nodejs.org/en/ and run the install, this will update it.
gonna close this one, if you still get the error after upgrading your node i'll reopen this 😄