thebergamo / ecommerce.js

Modern E-Commerce Platform for 21st century
ISC License
36 stars 9 forks source link

Running ecommerce.js #19

Open hjek opened 8 years ago

hjek commented 8 years ago

Tried cloning repo, doing npm install and then npm run and got this error:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'start' ]
2 info using npm@3.6.0
3 info using node@v5.7.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle ecommerce.js@0.0.1~prestart: ecommerce.js@0.0.1
6 silly lifecycle ecommerce.js@0.0.1~prestart: no script for prestart, continuing
7 info lifecycle ecommerce.js@0.0.1~start: ecommerce.js@0.0.1
8 verbose lifecycle ecommerce.js@0.0.1~start: unsafe-perm in lifecycle true
9 verbose lifecycle ecommerce.js@0.0.1~start: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/home/pelle/ecommerce.js/node_modules/.bin:/home/pelle/.gems/bin:/home/pelle/bin:/home/pelle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
10 verbose lifecycle ecommerce.js@0.0.1~start: CWD: /home/pelle/ecommerce.js
11 silly lifecycle ecommerce.js@0.0.1~start: Args: [ '-c', 'scripts/server' ]
12 info lifecycle ecommerce.js@0.0.1~start: Failed to exec start script
13 verbose stack Error: ecommerce.js@0.0.1 start: `scripts/server`
13 verbose stack spawn ENOENT
13 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:17:16)
13 verbose stack     at emitTwo (events.js:100:13)
13 verbose stack     at ChildProcess.emit (events.js:185:7)
13 verbose stack     at maybeClose (internal/child_process.js:827:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
14 verbose pkgid ecommerce.js@0.0.1
15 verbose cwd /home/pelle/ecommerce.js
16 error Linux 4.2.0-30-generic
17 error argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
18 error node v5.7.0
19 error npm  v3.6.0
20 error file sh
21 error code ELIFECYCLE
22 error errno ENOENT
23 error syscall spawn
24 error ecommerce.js@0.0.1 start: `scripts/server`
24 error spawn ENOENT
25 error Failed at the ecommerce.js@0.0.1 start script 'scripts/server'.
25 error Make sure you have the latest version of node.js and npm installed.
25 error If you do, this is most likely a problem with the ecommerce.js package,
25 error not with npm itself.
25 error Tell the author that this fails on your system:
25 error     scripts/server
25 error You can get information on how to open an issue for this project with:
25 error     npm bugs ecommerce.js
25 error Or if that isn't available, you can get their info via:
25 error     npm owner ls ecommerce.js
25 error There is likely additional logging output above.
26 verbose exit [ 1, true ]
thebergamo commented 8 years ago

Hi @hjek !

You're running on windows?

hjek commented 8 years ago

Hi @thebergamo , running Ubuntu Wily 64-bit.

$ node -v;npm -v
v5.7.0
3.6.0
thebergamo commented 8 years ago

hum... please try install just run the ./scripts/server. (You're running the branch master? I recommend you see/use the branch 2.0-dev). This error suggest you don't have this script probably you need run chmod +x /scripts/server for the script have the permission for running.

hjek commented 8 years ago

Cool. There's no documentation, so I was just trying random stuff.

Can't find branch 2.0-dev. It's not listed here.

Tried running ./scripts/server. Got this:

$ ./scripts/server 
==> Installing Node.js…
scripts/bootstrap: 26: scripts/bootstrap: nodenv: not found

Having run sudo npm install -g nodeenv doesn't change that.

Tried index.js (because it is referenced by ./scripts/server). Got this:

$ node index.js 
{ [Error: ENOENT: no such file or directory, open '.env'] errno: -2, code: 'ENOENT', syscall: 'open', path: '.env' }
{ [Error: EACCES: permission denied, mkdir '/home/logs']
  errno: -13,
  code: 'EACCES',
  syscall: 'mkdir',
  path: '/home/logs' }
160319/190216.775, [log,info], data: Server running at: http://localhost:8000
160319/190224.062, [response], http://localhost:8000: get / {} 404 (98ms) 

Note: On must *nixes the /home dir isn't writeable.

thebergamo commented 8 years ago

My bad, sorry. This project is heavily inspired in another project Start-Hapiness. In this project we use a .env file to load all the configurations, in the root of project have a file called .envsample, copy that file and change the values for yours own values.

$ cp .envsample .env

About the second error, at the path src/core/log.js the path save the logs files is ../../logs just in the root of project. If the path founded is /home/logs, you can just change for ./logs I guess.

I will improve the README.md of this project to inform better information of how running this project.

Is required use the correct values for PostgreSQL connection at .env file and run npm run migrate

hjek commented 8 years ago

Nice. It might make sense to put those instructions (files to copy from other projects, databases expected to be available, etc) in the Get Started section in the Readme.

thebergamo commented 8 years ago

@hjek of course, my bad!

This project is not finished yet, because that I not put these information in README.md. Using this instructions works?

hjek commented 8 years ago

@thebergamo to be honest, I am a bit lazy and gonna run it on very low end hardware, so I'm trying out some ecommerce that have embedded databases, like Spree and Flatmarket.

thebergamo commented 8 years ago

hm... alright!

This project are a little freeze, maybe in next months I do an upgrade and improve docs and complete all the minimum tasks to run and perform a good ecommerce platform supporting in various databases schemas.