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
Error after importing itk-wasm #872
Comments
Hi, is this with the latest version, 1.0.0-b119? |
Is it a version problem? I'll try the new version |
I imported 1.0.0-b.119 but it still reports an error |
Thanks for your reply,
I tried changing the version of ikt-wasm to 1.0.0-b119, but it still reported the error.
Is it because this project is using node 8.11.1? But this project won't run without using node8.11.1. Is there any js that can be used instead of ikt-wasm? I've recently been trying to parse dicom files with dicom-parser.js however, vtk shows the dicom files.
I look forward to hearing from you. - Thank you.
------------------ 原始邮件 ------------------
发件人: "InsightSoftwareConsortium/itk-wasm" ***@***.***>;
发送时间: 2023年7月27日(星期四) 上午6:30
***@***.***>;
***@***.******@***.***>;
主题: Re: [InsightSoftwareConsortium/itk-wasm] Error after importing itk-wasm (Issue #872)
Hi,
is this with the latest version, 1.0.0-b119?
https://www.npmjs.com/package/itk-wasm?activeTab=versions
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Hi, yes, node 8 may not know what to do with |
Hi, older versions of itk.js don't seem to have the js that will parse the dicom file, I'd actually like to use readImageDICOMArrayBufferSeries from itk-wasm, but itk.js doesn't seem to have it. |
It is possible to create a File from an ArrayBuffer. |
I'm sorry, I didn't understand what you meant, I'm in a situation where I can get the ArrayBuffe of the dicom file, and if I want to parse the supply to vtk.js for use then I have to use that method in itk.js? |
A File can be created with |
When I import itk-wasm my vue project reports an error!
import { readImageDICOMArrayBufferSeries } from 'itk-wasm'
The error is reported as follows
ERROR Failed to compile with 4 errors 16:34:04
error in ./node_modules/itk-wasm/dist/core/internal/createWebWorkerPromise.js
Module parse failed: E:\Desktop\structure_report_byHMRRC_VUE\node_modules\itk-wasm\dist\core\internal\createWebWorkerPromise.js Unexpected token (34:82)
You may need an appropriate loader to handle this file type.
| // adds worker dynamic import support:
| // https://bugzilla.mozilla.org/show_bug.cgi?id=1540913
| worker = new Worker(new URL('../../web-workers/pipeline.worker.js', import.meta.url));
| }
| else {
@ ./node_modules/itk-wasm/dist/io/readImageArrayBuffer.js 1:0-80
@ ./node_modules/itk-wasm/dist/io/browser/index.js
@ ./node_modules/itk-wasm/dist/index.js
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0&bustCache!./src/views/modules/generator/biao.vue
@ ./src/views/modules/generator/biao.vue
@ ./src/views ^./.*.vue$
@ ./src/router/import-development.js
@ ./src/router/index.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://127.0.0.1:8001 webpack/hot/dev-server babel-polyfill ./src/main.js
error in ./node_modules/itk-wasm/dist/core/internal/loadEmscriptenModuleNode.js
Module parse failed: E:\Desktop\structure_report_byHMRRC_VUE\node_modules\itk-wasm\dist\core\internal\loadEmscriptenModuleNode.js Unexpected token (6:37)
You may need an appropriate loader to handle this file type.
| import { dirname } from 'path';
| import { createRequire } from 'module';
| globalThis.__dirname = dirname(import.meta.url);
| globalThis.require = createRequire(import.meta.url);
| async function loadEmscriptenModuleNode(modulePath) {
@ ./node_modules/itk-wasm/dist/pipeline/runPipelineNode.js 1:0-80
@ ./node_modules/itk-wasm/dist/pipeline/node/index.js
@ ./node_modules/itk-wasm/dist/index.js
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0&bustCache!./src/views/modules/generator/biao.vue
@ ./src/views/modules/generator/biao.vue
@ ./src/views ^./.*.vue$
@ ./src/router/import-development.js
@ ./src/router/index.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://127.0.0.1:8001 webpack/hot/dev-server babel-polyfill ./src/main.js
error in ./node_modules/itk-wasm/dist/io/internal/findLocalImageIOPath.js
Module parse failed: E:\Desktop\structure_report_byHMRRC_VUE\node_modules\itk-wasm\dist\io\internal\findLocalImageIOPath.js Unexpected token (4:54)
You may need an appropriate loader to handle this file type.
| import localPathRelativeToModule from './localPathRelativeToModule.js';
@ ./node_modules/itk-wasm/dist/io/polyDataToMeshNode.js 2:0-68
@ ./node_modules/itk-wasm/dist/io/node/index.js
@ ./node_modules/itk-wasm/dist/index.js
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0&bustCache!./src/views/modules/generator/biao.vue
@ ./src/views/modules/generator/biao.vue
@ ./src/views ^./.*.vue$
@ ./src/router/import-development.js
@ ./src/router/index.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://127.0.0.1:8001 webpack/hot/dev-server babel-polyfill ./src/main.js
The text was updated successfully, but these errors were encountered: