webpack: I asked in StackOverflow, in Gitter Webpack and in Discord Electron but got no answer

I asked an helping request in StackOverflow: https://stackoverflow.com/questions/66075114/get-is-not-a-function-at-getpubsubrouter-how-to-fix-my-webpack-configuration

in webpack Gitter :

image

image

And also in Discord Electron Forum:

https://discord.com/channels/745037351163527189/745040553384870009/807540189886152724

image

but got no answer, no hints, no help at all. So, being conscious that this is not the right place, I ask here if there is someone who can give me an hand.

I’m having this error:

TypeError: get is not a function
    at getPubsubRouter (/home/marco/webMatters/electronMatters/IPFS-
Forge/.webpack/main/index.js:103184:20)
    at getLibp2pOptions (/home/marco/webMatters/electronMatters/IPFS-
Forge/.webpack/main/index.js:103201:15)
    at module.exports../node_modules/ipfs-core/src/components
/libp2p.js.module.exports (/home/marco/webMatters/electronMatters
/IPFS-Forge/.webpack/main/index.js:103152:25)
    at configureRepo (/home/marco/webMatters/electronMatters/IPFS-
Forge/.webpack/main/index.js:107078:18)
    at async loadRepo (/home/marco/webMatters/electronMatters/IPFS-
Forge/.webpack/main/index.js:106927:17)
    at async Function.start (/home/marco/webMatters/electronMatters
/IPFS-Forge/.webpack/main/index.js:106908:41)
    at async Object.create (/home/marco/webMatters/electronMatters
/IPFS-Forge/.webpack/main/index.js:102376:21)

Running the node debugging tool I get this error:

(base) marco@pc01:~/webMatters/electronMatters/IPFS-Forge$ node-
nightly --inspect ./node_modules/webpack/bin/webpack.js
 New nightly available. To upgrade: `node-nightly --upgrade` 
Debugger listening on ws://127.0.0.1:9229/fdab8bb4-cd2c-415d-8154-
ac4b554a0c0f
For help, see: https://nodejs.org/en/docs/inspector
Hash: a1c0ce406046af77594b
Version: webpack 4.46.0
Time: 24ms
Built at: 02/06/2021 1:41:03 PM

WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 
'production' for this value. Set 'mode' option to 'development' or 
'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn 
more: https://webpack.js.org/configuration/mode/

ERROR in Entry module not found: Error: Can't resolve './src' in 
'/home/marco/webMatters/electronMatters/IPFS-Forge'

Error, which I do not understand, because this is the path to main.ts :

(base) marco@pc01:~/webMatters/electronMatters/IPFS-Forge/src$ ls -lah 
 | grep main.ts 
-rwxr-xr-x 1 marco marco 1,6K feb  6 09:22 main.ts

that I defined in /tools/webpack/webpack.main.js :

 entry: ['./src/main.ts'],

And according to IPFS people the problems I’m having are due to the webpack configuration: https://github.com/ipfs/js-ipfs/issues/3531#issuecomment-773989083 But I do not understand where the problem is.

Would you be so kind in helping me to solve the problem?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 25 (14 by maintainers)

Most upvoted comments

@alexander-akait I’ve been trying to solve this problem, asking for help and getting no response, for the last three days. That’s why I’m here now

This is the reproducible test repo: https://github.com/raphael10-collab/IPFS-Forge git clone it -> yarn -> yarn start

I go back now to IPFS people asking, for the third day, for their help, and linking this github issue

Because developers can’t answer immediately, you need wait answer, also you ignore the issue template and I can’t help you because I can’t reproduce or can’t look at code, screenshots is not help here, if you need help ASAP - create reproducible test repo and be patient