forcejs icon indicating copy to clipboard operation
forcejs copied to clipboard

Error: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.

Open evanmcd opened this issue 6 years ago • 4 comments

Going through the quick start steps for a simple browser app, I get the following error when I run npm run webpack:

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.

I don't seem to be able to continue from that point - removing the config item loaders will run the build but end up with a 500 error coming from what seems to be an empty bundle.js file

evanmcd avatar Sep 24 '18 16:09 evanmcd

@evanmcd there are a couple of changes.

'loaders' has to be renamed 'rules' in the webpack.config.js

module: { rules: [ { test: /\.js$/, loader: 'babel-loader', } ] },

And Babel has deprecated the preset-env in Babel7.

Further the npm install should be npm install babel-loader@7' instead of npm install babel-loader webpack --save-dev`

@ccoenraets should quick start steps be updated?

JeroenSfdc avatar Jan 13 '19 09:01 JeroenSfdc

@JeroenSfdc I was facing the same issue. I followed your steps and it worked. Yes. The quick start steps are definitely misleading!

CognitiveClouds-Prasad avatar Apr 23 '19 19:04 CognitiveClouds-Prasad

@JeroenSfdc But, no matter what, I am seeing an empty screen with "Forcejs Quick Start". I am not sure how I can proceed. I have been struggling to get a solution in JS. See this for example: https://salesforce.stackexchange.com/questions/258643/how-to-do-post-after-getting-authorisation-token-and-instance-url-in-java-or-ja

CognitiveClouds-Prasad avatar Apr 24 '19 05:04 CognitiveClouds-Prasad

@CognitiveClouds-Prasad , I just saw the empty white screen with "Forcejs Quick Start" too until I changed index.html to src="dist/app.bundle.js". If you are getting a 500 error on that page you might have the same issue.

kbowerma avatar Jul 07 '19 04:07 kbowerma