deepal / boostnote-github-sync

✨ Sync BoostNote notes into Github Private Repo in Markdown format
20 stars 5 forks source link

Please update the quick start #23

Open Orange-Jun opened 5 years ago

Orange-Jun commented 5 years ago

Setting up:


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!

deepal commented 5 years ago

@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.

Orange-Jun commented 5 years ago

@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.

deepal commented 5 years ago

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.

Orange-Jun commented 5 years ago
1215 verbose stack Error: bcrypt@3.0.3 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 bcrypt@3.0.3
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 bcrypt@3.0.3 install: `node-pre-gyp install --fallback-to-build`
1224 error Exit status 1
1225 error Failed at the bcrypt@3.0.3 install script.
1225 error This is probably not a problem with npm. There is likely additional logging output above.
1226 verbose exit [ 1, true ]
deepal commented 5 years ago

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 commented 5 years ago

Try the following steps:

  1. Install windows-build-tools globally
    npm install --global --production windows-build-tools
  2. Clean up node_modules in the boostnote-github-sync project
  3. Re-install dependencies with npm install
Orange-Jun commented 5 years ago

@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 npm@6.9.0
3 info using node@v10.16.3
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

deepal commented 5 years ago

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