Skip to content

Commit e196e2b

Browse files
committed
Fixed bug Cannot find module package.json
1 parent ce85fd0 commit e196e2b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ var log;
44

55
class Config {
66
constructor() {
7-
this.version = require(process.cwd() + '/package.json').version;
7+
this.version = require(path.dirname(require.main.filename) +
8+
'/../package.json').version;
89
process.title = 'Sky Puppy v' + this.version;
910
try {
1011
this.path =

0 commit comments

Comments
 (0)