boostnote-github-sync icon indicating copy to clipboard operation
boostnote-github-sync copied to clipboard

Please update the quick start

Open Orange-Jun opened this issue 6 years ago • 8 comments

Setting up:

  • Clone the repository
  • Configure your github repository, personal access token and the local boostnotes directory in .env file.
  • Configure other application settings in config.js file.
  • Run npm install
  • Run npm start to run the sync process.

Configuration .env file

GITHUB_TOKEN="personal access token---个人访问令牌"
GITHUB_REPO="github repository---boostnote的github库地址"
LOCAL_BOOSTNOTE_DIR="local boostnotes directory---boostnote的本地储存目录"

Snipaste_2019-09-26_17-34-16

Configuration .env file

There is no clear description of which configuration is required

What are the necessary configuration files for config.js file???

Please update the quick start!

Orange-Jun avatar Sep 26 '19 10:09 Orange-Jun

@Ldada config.js contains all the configuration available, which you can tune according to your requirement. .env file contains secrets which allows boostnote-github-sync access to your github account. You have to generate them yourself as I mentioned in the readme, and put them in the .env file. All three variables in the .env file is required.

If you get any errors during startup, please describe it in details including the error stack trace.

deepal avatar Sep 26 '19 10:09 deepal

@dpjayasekara Ok, thank you very much! What are the requirements for the program operating environment?I was running a new machine that I just configured, and I seem to have missed some problems, so that some special errors occurred at runtime.

Orange-Jun avatar Sep 26 '19 10:09 Orange-Jun

Please include any errors with stack traces to identify your exact problem. And let me know the OS, and the node version of your setup.

deepal avatar Sep 26 '19 10:09 deepal

1215 verbose stack Error: [email protected] install: `node-pre-gyp install --fallback-to-build`
1215 verbose stack Exit status 1
1215 verbose stack     at EventEmitter.<anonymous> (D:\install\node\node-v10.16.3-win-x64\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
1215 verbose stack     at EventEmitter.emit (events.js:198:13)
1215 verbose stack     at ChildProcess.<anonymous> (D:\install\node\node-v10.16.3-win-x64\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
1215 verbose stack     at ChildProcess.emit (events.js:198:13)
1215 verbose stack     at maybeClose (internal/child_process.js:982:16)
1215 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
1216 verbose pkgid [email protected]
1217 verbose cwd E:\Monster\Desktop\boostnote-github-sync-master\boostnote-github-sync-master
1218 verbose Windows_NT 10.0.18362
1219 verbose argv "D:\\install\\node\\node-v10.16.3-win-x64\\node.exe" "D:\\install\\node\\node-v10.16.3-win-x64\\node_modules\\npm\\bin\\npm-cli.js" "install"
1220 verbose node v10.16.3
1221 verbose npm  v6.9.0
1222 error code ELIFECYCLE
1223 error errno 1
1224 error [email protected] install: `node-pre-gyp install --fallback-to-build`
1224 error Exit status 1
1225 error Failed at the [email protected] install script.
1225 error This is probably not a problem with npm. There is likely additional logging output above.
1226 verbose exit [ 1, true ]

Orange-Jun avatar Sep 26 '19 10:09 Orange-Jun

Unfortunately, this was tested on UNIX only. This seems to be a windows-specific problem, and the stack trace does not help a lot to identify the exact problem either. This looks related to https://github.com/kelektiv/node.bcrypt.js/issues/632 but I don't see any error/warn messages that it failed to download pre-built binaries. Is this stack trace complete?

deepal avatar Sep 26 '19 11:09 deepal

Try the following steps:

  1. Install windows-build-tools globally
npm install --global --production windows-build-tools
  1. Clean up node_modules in the boostnote-github-sync project
  2. Re-install dependencies with npm install

deepal avatar Sep 26 '19 11:09 deepal

@dpjayasekara I reinstalled C++ build tools for Windows --- windows-build-tools. Then npm install succeeded again, but there was an error in npm start. The error is : missing script: start

This is the error log:

0 info it worked if it ends with ok
1 verbose cli [ 'D:\\install\\node\\node-v10.16.3-win-x64\\node.exe',
1 verbose cli   'D:\\install\\node\\node-v10.16.3-win-x64\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose stack Error: missing script: start
4 verbose stack     at run (D:\install\node\node-v10.16.3-win-x64\node_modules\npm\lib\run-script.js:155:19)
4 verbose stack     at D:\install\node\node-v10.16.3-win-x64\node_modules\npm\lib\run-script.js:63:5
4 verbose stack     at D:\install\node\node-v10.16.3-win-x64\node_modules\npm\node_modules\read-package-json\read-json.js:115:5
4 verbose stack     at D:\install\node\node-v10.16.3-win-x64\node_modules\npm\node_modules\read-package-json\read-json.js:418:5
4 verbose stack     at checkBinReferences_ (D:\install\node\node-v10.16.3-win-x64\node_modules\npm\node_modules\read-package-json\read-json.js:373:45)
4 verbose stack     at final (D:\install\node\node-v10.16.3-win-x64\node_modules\npm\node_modules\read-package-json\read-json.js:416:3)
4 verbose stack     at then (D:\install\node\node-v10.16.3-win-x64\node_modules\npm\node_modules\read-package-json\read-json.js:160:5)
4 verbose stack     at D:\install\node\node-v10.16.3-win-x64\node_modules\npm\node_modules\read-package-json\read-json.js:280:12
4 verbose stack     at D:\install\node\node-v10.16.3-win-x64\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:90:16
4 verbose stack     at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
5 verbose cwd E:\Monster\Desktop\boostnote-github-sync-master\boostnote-github-sync-master
6 verbose Windows_NT 10.0.18362
7 verbose argv "D:\\install\\node\\node-v10.16.3-win-x64\\node.exe" "D:\\install\\node\\node-v10.16.3-win-x64\\node_modules\\npm\\bin\\npm-cli.js" "start"
8 verbose node v10.16.3
9 verbose npm  v6.9.0
10 error missing script: start
11 verbose exit [ 1, true ]

I think the reason for the error is in the package.json file.Start configuration under script is missing

Orange-Jun avatar Sep 27 '19 09:09 Orange-Jun

I'll fix that in the package.json. Please use node index.js until then. Thanks for reporting.

deepal avatar Sep 27 '19 11:09 deepal