CleverStack / cleverstack-cli

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

clever init stuck at 21% #84

Closed patrioticcow closed 8 years ago

patrioticcow commented 8 years ago

i get stuck at this.. only the backend folder gets created, though im not sure it's complete i have node 5.0.0 and npm 3.3.6

ideas?

[root@test node]# clever init voip
Preparing for installation...
  └── Creating project installation path...
Installing Backend...
  ├── Installation path is /usr/share/node/voip/backend...g: Loading...   ┊   Step: Loading...   ┊   Step Time: 1s   ┊

 Status @ 67s |   Installation Progress: [▒▒--------]  21 %   ┊   Installing: Backend   ┊   Step: Installing NPM modules...   ┊   Step Time: 63s   ┊
vicbiz commented 8 years ago

same problem... any solutions?

KaanErkol commented 8 years ago

+1

Ferhnir commented 8 years ago

+1

cleever commented 8 years ago

Same issue.

Update:

I ran the following command:

npm install node-gyp@latest

And init could continue normally.

pilsy commented 8 years ago

Sorry it's taken so long guy's, i haven't had much time over christmas & new years.

It looks like it was a problem with the grunt-node-inspector package that was specified in the node-seed, i removed that dependency in this commit https://github.com/CleverStack/node-seed/commit/91ffd882beecee401c46f90037d27144527b0444

Can you guy's give it another go? it should work properly now

pilsy commented 8 years ago

I found another issue which was not apparent to me straight away, because i was using --verbose

Take a look at https://github.com/CleverStack/cleverstack-cli/releases/tag/1.2.8 -- so before running init again please run npm install -g cleverstack-cli

patrioticcow commented 8 years ago

Here ya go, not sure if this is a cleverstack error, or just a protractor / visual studio / WindowsSDKDir
Running npm install -g protractor has some issues by itself

F:\work\cleverstack>clever init my-new-project
Preparing for installation...
  └── Creating project installation path...
Installing Backend...
  ├── Installation path is F:\work\cleverstack\my-new-project\backend...
  ├── Downloading and extracting node-seed...
  ├── Creating local configuration file config/local.json...
  ├── Installing NPM modules...
  └── Installing module dependencies...
?  Backend installation has completed successfully!

Installing Frontend...
  ├── Installation path is F:\work\cleverstack\my-new-project\frontend...
  ├── Downloading and extracting angular-seed...
  ├── Installing NPM modules...
  ├── Installing bundled modules...
  ├── Installing bower components...
  ├── Installing bower components for cs_messenger...
  ├── Installing bower components for cs_modal...
  ├── Installing bower components for cs_table...
  └──Installing protractor...
Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "npm run-script setup-protractor"

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program     Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run-script" "setup-protractor"
npm ERR! node v4.0.0
npm ERR! npm  v2.14.2
npm ERR! code ELIFECYCLE
npm ERR! angular-seed@1.2.0-rc-2 setup-protractor: `grunt webdriver:update`
npm ERR! Exit status 3
npm ERR!
npm ERR! Failed at the angular-seed@1.2.0-rc-2 setup-protractor script 'grunt webdriver:update'.
npm ERR! This is most likely a problem with the angular-seed package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     grunt webdriver:update
npm ERR! You can get their info via:
npm ERR!     npm owner ls angular-seed
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     F:\work\cleverstack\my-new-project\frontend\npm-debug.log

Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "npm run-script setup-protractor"

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run-script" "setup-protractor"
npm ERR! node v4.0.0
npm ERR! npm  v2.14.2
npm ERR! code ELIFECYCLE
npm ERR! angular-seed@1.2.0-rc-2 setup-protractor: `grunt webdriver:update`
npm ERR! Exit status 3
npm ERR!
npm ERR! Failed at the angular-seed@1.2.0-rc-2 setup-protractor script 'grunt webdriver:update'.
npm ERR! This is most likely a problem with the angular-seed package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     grunt webdriver:update
npm ERR! You can get their info via:
npm ERR!     npm owner ls angular-seed
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     F:\work\cleverstack\my-new-project\frontend\npm-debug.log

at ChildProcess.exithandler (child_process.js:203:12)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:817:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
From previous event:
at C:\Users\cristi\AppData\Roaming\npm\node_modules\cleverstack-cli\bin\clever-init:353:18
at processImmediate [as _immediateCallback] (timers.js:371:17)
From previous event:
at C:\Users\cristi\AppData\Roaming\npm\node_modules\cleverstack-cli\bin\clever-init:350:10
at C:\Users\cristi\AppData\Roaming\npm\node_modules\cleverstack-cli\node_modules\mkdirp\index.js:30:20
at FSReqWrap.oncomplete (fs.js:82:15)

Status @ 4.667m |   Installation Progress: [▒▒▒▒▒▒▒▒--]  79 %   ?   Installing: Frontend   ?   Step: Installing protractor (this might take awhile)...   ?   Step Time: 2s   ?
pilsy commented 8 years ago

hi @patrioticcow thanks for running that for me, that is a separate error caused by windows not supporting our built in protractor setup script (it works on linux/mac) -- to get protractor on windows you need to set it up yourself.

If you run the command again with the -S argument it should work completely (except it will skip installing protractor)

so just to be clear you need to run clever init my-new-project -S -- does that work?

btw you can see all the options/arguments by running clever init -h

patrioticcow commented 8 years ago

Sorry, it takes a while to complete the script.. It seems that with the -S option it works.

F:\>clever init my-new-projects -S
Preparing for installation...
  └── Creating project installation path...
Installing Backend...
  ├── Installation path is F:\my-new-projects\backend...
  ├── Downloading and extracting node-seed...
  ├── Creating local configuration file config/local.json...
  ├── Installing NPM modules...
  └── Installing module dependencies...
?  Backend installation has completed successfully!

Installing Frontend...
  ├── ? Skipping installation of protractor
  ├── Installation path is F:\my-new-projects\frontend...
  ├── Downloading and extracting angular-seed...
  ├── Installing NPM modules...
  ├── Installing bundled modules...
  ├── Installing bower components...
  ├── Installing bower components for cs_messenger...
  ├── Installing bower components for cs_modal...
  ├── Installing bower components for cs_table...
?  Frontend installation has completed successfully!

?  Project my-new-projects has been created in F:\my-new-projects

Status @ 10.350m |   Installation Progress: [▒▒▒▒▒▒▒▒▒▒]  100 %   ?   Installing: Done   ?   Step: Installation completed   ?   Step Time: 21s   ?

Running the server, gives me other issues.. not sure if it's related to protractor, but ill look into it at a lather point, when i get some time.

Thanks for the fixes

F:\my-new-projects>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.
pilsy commented 8 years ago

@patrioticcow you need to set your NODE_PATH (that's the error about cannot find module utils) ... take a look at http://cleverstack.io/documentation/backend/#setting-your-node-path

DonDiegoAA commented 8 years ago

Same error for me on Windows 10. -S argument worked for the init, but clever serve give me

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.

set NODE_PATH=./lib/;./modules/ also return an error (in french, sorry)

./modules/ : Le terme «./modules/» n'est pas reconnu comme nom d'applet de commande, fonction, fichier de script ou
programme exécutable. Vérifiez l'orthographe du nom, ou si un chemin d'accès existe, vérifiez que le chemin d'accès
est correct et réessayez.
Au caractère Ligne:1 : 22
+ set NODE_PATH=./lib/;./modules/
+                      ~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (./modules/:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

I tried to add NODE_PATH | ./lib/;./modules/ in my environment variables, without success. Thanks