Hi there,
I am having issues with the Gold Metal Metrics SQL Project
When I unzipped the files and start running the commands, I ran into this error when running the command npm run webpack
.
Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration.module has an unknown property 'loaders'. These properties are valid:
object { defaultRules?, exprContextCritical?, exprContextRecursive?, exprContextRegExp?, exprContextRequest?, generator?, noParse?, parser?, rules?, strictExportPresence?, strictThisContextOnImports?, unknownContextCritical?, unknownContextRecursive?, unknownContextRegExp?, unknownContextRequest?, unsafeCache?, wrappedContextCritical?, wrappedContextRecursive?, wrappedContextRegExp? }
-> Options affecting the normal modules (`NormalModuleFactory`).
Did you mean module.rules or module.rules.*.use?
I searched the community forum and only found this one message with no replies that was automatically closed due to inactivity. I don’t even see any other thread for this project at this time (nov 2021).
I figured out through searching on stack overflow that the loaders property on the module object is obsolete with recent versions of webpack, I resolved this by uninstalling and installing version 2.1.0-beta.22
based on a comment in this thread because I don’t understand the webpack.config.js
file well enough to try to replace the loader
property with rules
without a specific guidance. But now when I run npm run webpack
I am seeing this error:
ERROR in ./index.js
Module build failed: TypeError: fileSystem.statSync is not a function
at module.exports (/Users/.../project-5-gold-medal-metrics-start/node_modules/babel-loader/lib/utils/exists.js:7:25)
at find (/Users/.../project-5-gold-medal-metrics-start/node_modules/babel-loader/lib/resolve-rc.js:13:9)
at Object.module.exports (/Users/.../project-5-gold-medal-metrics-start/node_modules/babel-loader/lib/index.js:111:132)
I then found this thread that seemed to suggest that downgrading to an older version of babel-loader would resolve the issue. It seemed to but now when I run npm run webpack
, I get this error:
ERROR in ./utils/GoldMedalMetrics.js
Module not found: Error: Can't resolve 'whatwg-fetch' in '/Users/anabelcurry/Projects/web-basics/codeacademy/lesson-notes/LessonSQLite/project-5-gold-medal-metrics-start/utils'
@ ./utils/GoldMedalMetrics.js 7:0-23
@ ./Components/CountryDetail.js
@ ./App.js
@ ./index.js
And sadly this has been my dead end. I am at a loss of what to do next, I can’t find a clear answer and even if I did, I fear that this is a domino effect of downgrading, and I would be better off just trying to replace the loaders
with rules
, I just don’t know how.
Any ideas? I would hate to skip this project without ever making it to step one.