Closed JZiebikiewicz closed 7 years ago
@JZiebikiewicz did you follow the install steps in README? What version of node are you using?
@andreftavares yes, I did all steps. I use Node 4.4.5 and npm 2.15.5. Tried also Node 6, but no luck.
Maybe you've got some extra modules installed and not added to package.json? Or maybe we should try babel@6?
@JZiebikiewicz i'm running it using Node.js v4.2.5 and NPM v3.5.3. Did you change the version of any package on package.json? What version of babel are you running? npm list babel
No. Just cloned repo, npm installed and followed config instructions. I have Babel 5.8.38.
It must be something wrong with my server. On my laptop (Windows 7 64bit) API works with Node 6.2.2 and Node 4.4.5 too. On server (Ubuntu 14.04 64bit) with none of them. Really weird.
@andreftavares, sooo stupid mistake. I had .babelrc file from another project in parent directory. Like:
/my-project/.babelrc
/my-project/atlas/
That caused all troubles. Sorry for hassle. Your code is correct! :)
BTW, I can't use bcrypt module on Windows. I replaced it with bcrypt-nodejs 0.0.3. Requires changing imports from import bcrypt from 'bcrypt';
to import bcrypt from 'bcrypt-nodejs';
in:
\src\resources\carts\models.js
\src\resources\users\models.js
@JZiebikiewicz woah didn't know about that .babelrc
scenario, nice catch! Perhaps I'll add that tip to the README :)
In regards to Windows, according to this:
Windows users should make sure to have at least node 0.8.5 installed and version >= 0.7.1 of this module.
<-- So you should be fine, no?
Either way, after replacing the imports, did it work alright?
I can't run api (
npm run dev
). I get these errors:Something wrong with babel I think :/