-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
encoder.json does not exist in chunks directory. #39
Comments
I have the same issue, i'm using node 16 |
same in lambda function |
Same problem. I am using Electron from Typescript and Webpack. Version |
Same problem. |
node: v16.16.0 Activating extension 'undefined_publisher.x' failed: ENOENT: no such file or directory, open '/Users/Public/dev/z-copilot/dist/encoder.json'. |
Running into this problem also in an Electron App (Obsidian Plugin). It looks like the problem might be coming from around line 5 where its trying to load |
It seems that this file is somehow not getting bundled. I worked around this by manually copying it into the build like this: (next.config.js) const CopyPlugin = require('copy-webpack-plugin');
/** @type {import('next').NextConfig} */
module.exports = {
webpack: (config, { isServer }) => {
if (isServer) {
config.plugins.push(
new CopyPlugin({
patterns: [
{
from: 'node_modules/gpt-3-encoder/encoder.json',
to: 'encoder.json',
},
{
from: 'node_modules/gpt-3-encoder/vocab.bpe',
to: 'vocab.bpe',
},
],
})
);
}
return config;
},
}; |
I ended up switching my library, GPT Toolkit, to gpt-tokenizer which does not have this issue. |
There is an error during building in Next.js applications:
I tried Node.js 16 and 18, result in the same error.
The text was updated successfully, but these errors were encountered: