shady2k / logseq-inbox-telegram-plugin

MIT License
78 stars 5 forks source link

Fix project dependencies so it could be cloned and built locally #33

Closed LelouchHe closed 1 year ago

LelouchHe commented 1 year ago

The current dependencies seem broken. Once cloned to local, it fails to yarn install due to dependencies build errors.

Below are the errors from yarn install

➤ YN0009: │ msgpackr-extract@npm:1.0.15 couldn't be built successfully (exit code 1, logs can be found here: C:\Users\longh\AppData\Local\Temp\xfs-41b8c800\build.log) ➤ YN0009: │ lmdb-store@npm:1.6.13 couldn't be built successfully (exit code 1, logs can be found here: C:\Users\longh\AppData\Local\Temp\xfs-7d83501c\build.log)

The major error from build log is:

\logseq-inbox-telegram-plugin\node_modules\nan\nan_callbacks.h(55,23): error C2039: 'AccessorSignature': is not a member of 'v8' [\logseq-inbox-telegram-plugin\node_modules\lmdb-store\build\lmdb.vcxproj]

Based on nan_callbacks.h:55:23: error: ‘AccessorSignature’ is not a member of ‘v8’ #942, packages are updated to fix this error.

It also add .yarnrc.yml and .yarn/ to .gitignore

shady2k commented 1 year ago

It's strange, but I have no errors. How can I reproduce this problem?

LelouchHe commented 1 year ago

It's strange, but I have no errors. How can I reproduce this problem?

  • Clone the repository
  • Execute yarn install Is it right?

Yes. My dev environment is new, since I just installed the node (v19.6.0) and other tools before I cloned this repository.

shady2k commented 1 year ago

It forces me to install Buffer.

@parcel/resolver-default: Auto installing polyfill for Node builtin module "buffer"...

/Users/shady/Documents/repos/logseq-inbox-telegram-plugin/node_modules/axios/lib/helpers/toFormData.js:128:74 127 | if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {

128 | return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value); | ^^^^^^ used here 129 | } 130 |

📝 Learn more: https://parceljs.org/features/node-emulation/#polyfilling-%26-excluding-builtin-node-modules

Installing buffer...

"devDependencies": { "buffer": "^5.5.0", "parcel": "^2.8.3" },

LelouchHe commented 1 year ago

it does the same thing for mine when i continued to update the code. do you know whether we should update that and others? maybe yours still uses the build cache from previous build? i'm new to node, so i'm not quite sure.

btw, what is your node version? should i try the 18.14? or does it matter here?