Closed species closed 7 years ago
ahah flattered ;) can't reproduce unfortunately. I would recommend installing the latest node v6 (which should come with npm v3, or now even v4), as many warning mention npm v3+
Luckily, you are using nvm so that should be quite easy:
$ nvm install 6 && nvm use 6
$ exit
(reopen)
$ nvm current
should return v6.x.x, if not, see in your .bashrc/.zshrc/.profile files if something triggers a version in particular.
Then
cd path/to/this/project
rm -rf node_modules
npm install
Can you try that and tell us how it goes?
Thanks, npm install now works without an error...
But, now npm start
fails:
> transformap-api@1.0.0 prestart /home/user/data.transformap.co
> node ./db/prestart.js
/home/user/data.transformap.co/db/prestart.js:7
const wrap = (el) => `"${el}"`
^
SyntaxError: Unexpected token >
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3
npm ERR! Linux 4.7.0-0.bpo.1-amd64
npm ERR! argv "node" "/usr/local/bin/npm" "start"
npm ERR! node v0.10.38
npm ERR! npm v2.9.0
npm ERR! code ELIFECYCLE
npm ERR! transformap-api@1.0.0 prestart: `node ./db/prestart.js`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the transformap-api@1.0.0 prestart script 'node ./db/prestart.js'.
npm ERR! This is most likely a problem with the transformap-api package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./db/prestart.js
npm ERR! You can get their info via:
npm ERR! npm owner ls transformap-api
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/user/data.transformap.co/npm-debug.log
The error looks weird to me: did the syntax of JS change in node 6?
no, its that your NVM environment isn't working properly here, so you're back to your apt-get install
ed node executable I guess:
npm ERR! node v0.10.38
npm ERR! npm v2.9.0
Node v0.10 knows very little about ES6, thus its ignorance of arrow functions.
To fix NVM, make sure that those two lines
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
are in one of ~/.bash_profile
, ~/.zshrc
, ~/.profile
, or ~/.bashrc
You may also run nvm alias default 6
You seem to run node 0.10.38, not 6 ...
Am 24.10.2016 16:34 schrieb "Michael Maier" notifications@github.com:
Thanks, npm install now works without an error...
But, now npm start fails:
transformap-api@1.0.0 prestart /home/user/data.transformap.co node ./db/prestart.js
/home/user/data.transformap.co/db/prestart.js:7 const wrap = (el) =>
"${el}"
^ SyntaxError: Unexpected token > at Module._compile (module.js:439:25) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:906:3npm ERR! Linux 4.7.0-0.bpo.1-amd64 npm ERR! argv "node" "/usr/local/bin/npm" "start" npm ERR! node v0.10.38 npm ERR! npm v2.9.0 npm ERR! code ELIFECYCLE npm ERR! transformap-api@1.0.0 prestart:
node ./db/prestart.js
npm ERR! Exit status 8 npm ERR! npm ERR! Failed at the transformap-api@1.0.0 prestart script 'node ./db/prestart.js'. npm ERR! This is most likely a problem with the transformap-api package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node ./db/prestart.js npm ERR! You can get their info via: npm ERR! npm owner ls transformap-api npm ERR! There is likely additional logging output above.npm ERR! Please include the following file with any support request: npm ERR! /home/user/data.transformap.co/npm-debug.log
The error looks weird to me: did the syntax of JS change in node 6?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/TransforMap/data.transformap.co/issues/38#issuecomment-255758045, or mute the thread https://github.com/notifications/unsubscribe-auth/AADbt86vyxrCI_HlXYeimfWyBqtpG7EWks5q3MHvgaJpZM4KeLHI .
Thanks for all the hints!
After a three-day-Odyssee with setting up CouchDB on Debian, I can confirm it works as expected ☺.
The current dependencies in package.json throw a lot of errors when trying to install development dependencies.
To the JS demigods, @maxlath any ideas?
npm install --dev output: