react应用使用eject之后编译报错
console不行必须使用window.console
ERROR in ./src/pages/home/map3d/cesiumReact/datasource/GeoJson.jsx 29:6-13
Module not found: Error: You attempted to import /Users/wen/gisspring-project/smart-city-management/node_modules/console-browserify/index.js which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.
You can either move it inside src/, or add a symlink to it from project's node_modules/.
ERROR in ./src/pages/home/map3d/cesiumReact/datasource/GeoJson.jsx
Cannot read property 'module' of undefined
没有找到相关的问题
直接使用console
GeoJson.jsx 29 行 这个组件截个图看看 。可能是 this指向问题(不过 console是全局属性不应该出现这个问题)