Closed yundian closed 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.
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?
$ npm install string-replace --save-dev
$ npm run build
I used to appear after the wrong!
Is there a requirement for a computer system?
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)
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
Thanks, I succeeded.
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?