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

error compiling geoblaze #189

Open
rumski20 opened this issue Jul 8, 2022 · 0 comments
Open

error compiling geoblaze #189

rumski20 opened this issue Jul 8, 2022 · 0 comments

Comments

@rumski20
Copy link

rumski20 commented Jul 8, 2022

Describe the bug
I have a Vue/Webpack app that uses geoblaze. When I try to compile (eg. npm run serve) the app I get the following errors:

 ERROR  Failed to compile with 2 errors                                           4:21:10 PM

 error  in ./node_modules/geoblaze/src/load/load.module.js

Module not found: Error: Can't resolve 'url' in 'C:\Projects\forest-opt\client\forest-opt-client\node_modules\geoblaze\src\load'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. 
This is no longer the case. Verify if you need this module and configure a polyfill for it. 

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "url": require.resolve("url/") }'
        - install 'url'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "url": false }

 error  in ./node_modules/geoblaze/src/parse/parse.module.js

Module not found: Error: Can't resolve 'url' in 'C:\Projects\forest-opt\client\forest-opt-client\node_modules\geoblaze\src\parse'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. 
This is no longer the case. Verify if you need this module and configure a polyfill for it. 

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "url": require.resolve("url/") }'
        - install 'url'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "url": false }

ERROR in ./node_modules/geoblaze/src/load/load.module.js 3:0-26
Module not found: Error: Can't resolve 'url' in 'C:\Projects\forest-opt\client\forest-opt-client\node_modules\geoblaze\src\load'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. 
This is no longer the case. Verify if you need this module and configure a polyfill for it. 

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "url": require.resolve("url/") }'
        - install 'url'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "url": false }
 @ ./node_modules/geoblaze/src/load/index.js 20:0-40 20:0-40
 @ ./node_modules/geoblaze/src/wrap-load.js 1:0-26 8:13-17
 @ ./node_modules/geoblaze/src/raster-calculator/raster-calculator.module.js 5:0-32 79:15-19 @ ./node_modules/geoblaze/src/raster-calculator/index.js 14:0-53 14:0-53
 @ ./src/modules/foRasterLayer.js 22:0-71 212:24-40
 @ ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/Map.vue?vue&type=script&lang=js 13:0-55 314:22-35
 @ ./src/components/Map.vue?vue&type=script&lang=js 1:0-195 1:0-195 1:196-380 1:196-380     
 @ ./src/components/Map.vue 2:0-54 3:0-49 3:0-49 8:49-55
 @ ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/views/Tool.vue?vue&type=script&lang=js 2:0-42 18:4-9
 @ ./src/views/Tool.vue?vue&type=script&lang=js 1:0-196 1:0-196 1:197-382 1:197-382
 @ ./src/views/Tool.vue 2:0-55 3:0-50 3:0-50 8:49-55
 @ ./src/router/index.js 14:0-37 58:13-17
 @ ./src/main.js 18:0-30 29:8-14 40:3-9

ERROR in ./node_modules/geoblaze/src/parse/parse.module.js 2:0-26
Module not found: Error: Can't resolve 'url' in 'C:\Projects\forest-opt\client\forest-opt-client\node_modules\geoblaze\src\parse'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. 
This is no longer the case. Verify if you need this module and configure a polyfill for it. 

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "url": require.resolve("url/") }'
        - install 'url'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "url": false }
 @ ./node_modules/geoblaze/src/parse/index.js 24:0-41 24:0-41
 @ ./node_modules/geoblaze/src/wrap-parse.js 1:0-28 8:13-18
 @ ./node_modules/geoblaze/src/get/get.module.js 3:0-33 105:15-19
 @ ./node_modules/geoblaze/src/get/index.js 14:0-39 14:0-39
 @ ./node_modules/geoblaze/src/raster-calculator/raster-calculator.module.js 4:0-25 39:22-25 @ ./node_modules/geoblaze/src/raster-calculator/index.js 14:0-53 14:0-53
 @ ./src/modules/foRasterLayer.js 22:0-71 212:24-40
 @ ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/Map.vue?vue&type=script&lang=js 13:0-55 314:22-35
 @ ./src/components/Map.vue?vue&type=script&lang=js 1:0-195 1:0-195 1:196-380 1:196-380     
 @ ./src/components/Map.vue 2:0-54 3:0-49 3:0-49 8:49-55
 @ ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/views/Tool.vue?vue&type=script&lang=js 2:0-42 18:4-9
 @ ./src/views/Tool.vue?vue&type=script&lang=js 1:0-196 1:0-196 1:197-382 1:197-382
 @ ./src/views/Tool.vue 2:0-55 3:0-50 3:0-50 8:49-55
 @ ./src/router/index.js 14:0-37 58:13-17
 @ ./src/main.js 18:0-30 29:8-14 40:3-9

webpack compiled with 2 errors

To Reproduce
Compile or build an app using geoblaze.
[email protected]
[email protected]

Expected behavior
Expected app to compile without errors

Additional context
This worked fine before when I was using [email protected] and webpack was likely < 5

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

1 participant