-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
a 模块未找到 #316
Comments
@UtherPim |
在src/background.js下打开注释: // import { createExtractorFromFile } from 'node-unrar-js/esm' |
It seems the webpack in your project (installed by vue) tries to parse the |
The npm install node-unrar-js@beta And use the import { createExtractorFromData } from 'node-unrar-js/esm-asm'
import fs from 'fs'
const rarFile = fs.readFileSync('./WithComment.rar')
async function extract() {
const extractor = await createExtractorFromData({data: rarFile})
const {fileHeaders} = extractor.getFileList()
console.log([...fileHeaders])
} |
谢谢,新版本可以执行了,但是还是有解压问题 |
env: macos M1
node@16.8
electron@16.0.2
import { createExtractorFromFile } from 'node-unrar-js/esm';
const wasmBinary = fs.readFileSync(require.resolve('node-unrar-js/esm/js/unrar.wasm'));
const extractor = await createExtractorFromFile({
wasmBinary,
filepath,
targetPath
});
运行报错:
This dependency was not found:
To install it, you can run: npm install --save a
ERROR Build failed with errors.
The text was updated successfully, but these errors were encountered: