Kitware / vtk-js

Visualization Toolkit for the Web
https://kitware.github.io/vtk-js/
BSD 3-Clause "New" or "Revised" License
1.23k stars 371 forks source link

Please help me!! #5

Closed yundian closed 8 years ago

yundian commented 8 years ago

What should I do when I am finished? I didn't know how to use it even though I read the document. How can I show it on a web page as an example? Do I need to use webpack?

jourdain commented 8 years ago

Have you done that?

https://kitware.github.io/vtk-js/docs/setup.html

You need to run $ npm run build to compile the application code. Then if you serve your dist/ directory you should have the application visible in your browser.

One issue in the documentation is that I forget to give the content of .eslintrc.js, but you can get it from vtk.js if you don't want to write your own.

yundian commented 8 years ago

ERROR in ./~/babel-loader?presets[]=es2015,presets[]=react!./~/string-replace?{"multiple":[{"search":"vtkDebugMacro","replace":"console.debug","flags":"g"},{"search":"vtkErrorMacro","replace":"console.error","flags":"g"},{"search":"vtkWarningMacro","replace":"console.warn","flags":"g"}]}!./~/eslint-loader!./src/index.js

/home/ubuntu/myWebProject/src/index.js 47:2 error Parsing error: 'import' and 'export' may only appear at the top level ERROR in ./~/babel-loader?presets[]=es2015,presets[]=react!./~/string-replace?{"multiple":[{"search":"vtkDebugMacro","replace":"console.debug","flags":"g"},{"search":"vtkErrorMacro","replace":"console.error","flags":"g"},{"search":"vtkWarningMacro","replace":"console.warn","flags":"g"}]}!./~/eslint-loader!./src/index.js Module build failed: TypeError: Cannot read property 'parallel' of undefined at Object.module.exports (/home/ubuntu/myWebProject/node_modules/string-replace/index.js:23:18) @ ./src/index.js 1:38-557

I joined the file, but it is also wrong. Can you tell me what's going on?

jourdain commented 8 years ago
$ npm install string-replace  --save-dev
$ npm run build
yundian commented 8 years ago

I used to appear after the wrong!

yundian commented 8 years ago

Is there a requirement for a computer system?

yundian commented 8 years ago

ERROR in ./index.js Module build failed: TypeError: Cannot read property 'parallel' of undefined at Object.module.exports (/home/ubuntu/vtkjs/node_modules/string-replace/index.js:23:18)

jourdain commented 8 years ago

Your system is fine, just the doc is slightly off. Pushing some update right now.

For you, you might be able to just run again those commands or start again the new doc once online.

$ npm install kitware/vtk-js
$ npm run build
yundian commented 8 years ago

Thanks, I succeeded.