CleverStack / cleverstack-cli

CLI for CleverStack
http://youtube.com/watch?v=-4ArURHExhQ
MIT License
196 stars 33 forks source link

Install/Setup Failure #79

Closed rjbenson01 closed 9 years ago

rjbenson01 commented 9 years ago

Trying to find a working FullStack solution for Angular+Express+Node+Mysql, but so far I can't find a single solution that works :(. I had hoped your project would be able to save me from the sea of unfinished/unsupported projects but I'm not getting anywhere following the setup instructions for this project either :(.

Install/Setup insructions I followed to the 'T' several attempts/trys: https://github.com/CleverStack/cleverstack-cli

The Error(s): One for trying to run tests and the other trying to serve the site.

C:\Users\Gurai\my-new-project>clever test unit Scanning folders for Gruntfiles... Running "mochaTest:unit" (mochaTest) task

Mocha exploded! C:\Users\Gurai\my-new-project\backend\lib\utils\miner.es6:7 export default function() { ^^^^^^ SyntaxError: Unexpected reserved word at exports.runInThisContext (vm.js:73:16) at Module._compile (module.js:443:25) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) at require (module.js:384:17) at bootApplication (C:\Users\Gurai\my-new-project\backend\lib\utils\boots trapEnv.js:112:4) at Object.bootstrapEnv (C:\Users\Gurai\my-new-project\backend\lib\utils\b ootstrapEnv.js:117:5) at Object. (C:\Users\Gurai\my-new-project\backend\tests\unit\u tils\bootstrapEnv.js:2:25) at Module._compile (module.js:460:26) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) at require (module.js:384:17) Warning: Task "mochaTest:unit" failed. Use --force to continue.

Aborted due to warnings.

C:\Users\Gurai\my-new-project>clever server Loading "Gruntfile.js" tasks...ERROR

Error: Cannot find module 'utils' Warning: Task "server" not found. Use --force to continue.

Aborted due to warnings. Loading "Gruntfile.js" tasks...ERROR

Error: Cannot find module 'utils' Warning: Task "server:web" not found. Use --force to continue.

Aborted due to warnings.

C:\Users\Gurai\my-new-project>

rjbenson01 commented 9 years ago

I also tried going into the frontend and backend folders to run grunt manually or clever server/test etc with similar errors. Please advise :)!

pilsy commented 9 years ago

Take a look at https://github.com/CleverStack/cleverstack-cli/issues/76#issuecomment-121777570 - this is the cause of all your issues, you need to set your NODE_PATH, if you look at http://cleverstack.io/getting-started there's a red warning/call out about the cannot find utils error.

So yeah try that and see if it fixes these errors your seeing and thanks for not only reporting it :)

also @DaBoogs great to hear you tried with just grunt and in each folder, this is the first thing i would have done - and in most cases that would lead you quickly around the issue (and help you know what the issue is) ... this is definitely the most common hicup people have when using CleverStack (especially on windows, because on linux/mac i can rely on POSIX and env vars more) - meaning most of the time you don't even need to set your NODE_PATH manually when using the clever cli - that callout mentions what i'm talking about - when using grunt directly you will always have to set your NODE_PATH regardless of platform/os, because i use the cleverstack-cli to set that env var (temporarily) and then call on grunt/bower/gulp to run whatever it is your trying to do -- so you don't (usually) have to set your NODE_PATH. (but when using grunt you absolutely must set it)

pilsy commented 9 years ago

This was related to Babel, it has been fixed in the latest release of the node-seed - can you confirm if the issue has been resolved for you?