Skip to content
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

Beginner question. #5

Closed
alexchern opened this issue Mar 2, 2017 · 4 comments
Closed

Beginner question. #5

alexchern opened this issue Mar 2, 2017 · 4 comments

Comments

@alexchern
Copy link

Hi there,

Followed the instructions, but this is what I got at the end:

C:\WorkTmp\react-redux-cesium-testing-demo>npm run dev

[email protected] dev C:\WorkTmp\react-redux-cesium-testing-demo
cross-env NODE_ENV=development node devServer.js

Listening at http://localhost:3000
webpack built 46de09b66803c0958f28 in 920ms
Hash: 46de09b66803c0958f28
Time: 920ms
chunk {0} app.js (app) 8.13 kB [rendered]

ERROR in ./src/index.js
Module build failed: TypeError: Path must be a string. Received undefined
at assertPath (path.js:7:11)
at Object.dirname (path.js:695:5)
at C:\WorkTmp\react-redux-cesium-testing-demo\node_modules\babel-core\lib\transformation\file\options\option-manager.js:374:36
at C:\WorkTmp\react-redux-cesium-testing-demo\node_modules\babel-core\lib\transformation\file\options\option-manager.js:396:22
at Array.map (native)
at OptionManager.resolvePresets (C:\WorkTmp\react-redux-cesium-testing-demo\node_modules\babel-core\lib\transformation\file\options\option-manager.js:385:20)
at OptionManager.mergePresets (C:\WorkTmp\react-redux-cesium-testing-demo\node_modules\babel-core\lib\transformation\file\options\option-manager.js:369:10)
at OptionManager.mergeOptions (C:\WorkTmp\react-redux-cesium-testing-demo\node_modules\babel-core\lib\transformation\file\options\option-manager.js:328:14)
at C:\WorkTmp\react-redux-cesium-testing-demo\node_modules\babel-core\lib\transformation\file\options\option-manager.js:370:14
at C:\WorkTmp\react-redux-cesium-testing-demo\node_modules\babel-core\lib\transformation\file\options\option-manager.js:390:24
at Array.map (native)
at OptionManager.resolvePresets (C:\WorkTmp\react-redux-cesium-testing-demo\node_modules\babel-core\lib\transformation\file\options\option-manager.js:385:20)
at OptionManager.mergePresets (C:\WorkTmp\react-redux-cesium-testing-demo\node_modules\babel-core\lib\transformation\file\options\option-manager.js:369:10)
at OptionManager.mergeOptions (C:\WorkTmp\react-redux-cesium-testing-demo\node_modules\babel-core\lib\transformation\file\options\option-manager.js:328:14)
at OptionManager.addConfig (C:\WorkTmp\react-redux-cesium-testing-demo\node_modules\babel-core\lib\transformation\file\options\option-manager.js:234:10)
at OptionManager.findConfigs (C:\WorkTmp\react-redux-cesium-testing-demo\node_modules\babel-core\lib\transformation\file\options\option-manager.js:434:16)
@ multi app
Child html-webpack-plugin for "index.html":
chunk {0} index.html 412 kB [rendered]
webpack: bundle is now VALID.

What's wrong?

Thanks a lot,

Alex

@markerikson
Copy link
Owner

Appears to be webpack/webpack#2463 . Basically, something about babel-core does not work under Node 6+, but only under Node 5. Upgrading babel-core to 6.10.4+ is supposed to fix the issue.

FYI, I'm currently working on a blog post that will show how to use Cesium in a Webpack-based application, with a newer sample project as an example. Keep an eye on http://blog.isquaredsoftware.com/ - I hope to publish the post by next week.

Also, out of curiosity: how did you find this repo?

@alexchern
Copy link
Author

alexchern commented Mar 2, 2017 via email

@markerikson
Copy link
Owner

Gotcha. Well, if you gimme just a few more days, you'll have a lot more information on the topic available :)

And yeah, what I'm going to demonstrate in more depth is how to:

  • Initialize and show Cesium at a basic level in a Webpack-based app
  • Control Cesium's behavior using React components (rendering billboards+labels+polylines, mouse interaction, camera control)
  • Advanced Webpack configuration to enable code splitting and delay-loading Cesium

@markerikson
Copy link
Owner

And as promised, I just published a 2-part post on "Declaratively Rendering Earth in 3D: Using Cesium with React and Webpack". Part 1 covers basic Cesium+Webpack setup and build optimization with DllPlugin. Part 2 shows declarative React components that wrap imperative APIs:

http://blog.isquaredsoftware.com/2017/03/declarative-earth-part-1-cesium-webpack/
http://blog.isquaredsoftware.com/2017/03/declarative-earth-part-2-cesium-react/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants