I did the changes to package.json and webpack.config.js, and run the different npm install --legacy-peer-deps and npm audit fix.
After running through the tutorial up to npm install terser, I am getting the following error:
npm install
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'intergram@0.0.1',
npm WARN EBADENGINE required: { node: '6.9.1', npm: '3.10.8' },
npm WARN EBADENGINE current: { node: 'v16.13.2', npm: '8.4.1' }
npm WARN EBADENGINE }
> intergram@0.0.1 postinstall
> npm run build
> intergram@0.0.1 build
> shx mkdir -p dist && shx cp *.html dist && shx cp -r ./media dist && shx cp -r ./css dist && webpack --mode production
assets by status 6.91 KiB [cached] 2 assets
./src/widget/widget-index.js 39 bytes [built] [code generated] [1 error]
./src/chat/chat-index.js 39 bytes [built] [code generated] [1 error]
ERROR in ./src/chat/chat-index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Plugin/Preset files are not allowed to export objects, only functions. In /home/juanpablo/intergram/node_modules/babel-preset-es2015/lib/index.js
at createDescriptor (/home/juanpablo/intergram/node_modules/@babel/core/lib/config/config-descriptors.js:160:11)
at createDescriptor.next (<anonymous>)
at step (/home/juanpablo/intergram/node_modules/gensync/index.js:261:32)
at evaluateAsync (/home/juanpablo/intergram/node_modules/gensync/index.js:291:5)
at /home/juanpablo/intergram/node_modules/gensync/index.js:44:11
at Array.forEach (<anonymous>)
at Function.async (/home/juanpablo/intergram/node_modules/gensync/index.js:43:15)
at Function.all (/home/juanpablo/intergram/node_modules/gensync/index.js:216:13)
at Generator.next (<anonymous>)
at createDescriptors (/home/juanpablo/intergram/node_modules/@babel/core/lib/config/config-descriptors.js:102:41)
at createDescriptors.next (<anonymous>)
at createPresetDescriptors (/home/juanpablo/intergram/node_modules/@babel/core/lib/config/config-descriptors.js:96:17)
at createPresetDescriptors.next (<anonymous>)
at /home/juanpablo/intergram/node_modules/@babel/core/lib/gensync-utils/functional.js:21:23
at Generator.next (<anonymous>)
at mergeChainOpts (/home/juanpablo/intergram/node_modules/@babel/core/lib/config/config-chain.js:350:34)
at mergeChainOpts.next (<anonymous>)
at chainWalker (/home/juanpablo/intergram/node_modules/@babel/core/lib/config/config-chain.js:316:14)
at chainWalker.next (<anonymous>)
at loadFileChain (/home/juanpablo/intergram/node_modules/@babel/core/lib/config/config-chain.js:191:24)
at loadFileChain.next (<anonymous>)
at buildRootChain (/home/juanpablo/intergram/node_modules/@babel/core/lib/config/config-chain.js:108:31)
at buildRootChain.next (<anonymous>)
at loadPrivatePartialConfig (/home/juanpablo/intergram/node_modules/@babel/core/lib/config/partial.js:72:62)
at loadPrivatePartialConfig.next (<anonymous>)
at loadPartialConfig (/home/juanpablo/intergram/node_modules/@babel/core/lib/config/partial.js:115:25)
at loadPartialConfig.next (<anonymous>)
at step (/home/juanpablo/intergram/node_modules/gensync/index.js:269:25)
at /home/juanpablo/intergram/node_modules/gensync/index.js:273:13
at async.call.result.err.err (/home/juanpablo/intergram/node_modules/gensync/index.js:223:11)
at /home/juanpablo/intergram/node_modules/gensync/index.js:50:45
at step (/home/juanpablo/intergram/node_modules/gensync/index.js:287:14)
at /home/juanpablo/intergram/node_modules/gensync/index.js:273:13
at async.call.result.err.err (/home/juanpablo/intergram/node_modules/gensync/index.js:223:11)
at /home/juanpablo/intergram/node_modules/gensync/index.js:189:28
at /home/juanpablo/intergram/node_modules/@babel/core/lib/gensync-utils/async.js:67:7
at /home/juanpablo/intergram/node_modules/gensync/index.js:113:33
at step (/home/juanpablo/intergram/node_modules/gensync/index.js:287:14)
at /home/juanpablo/intergram/node_modules/gensync/index.js:273:13
at async.call.result.err.err (/home/juanpablo/intergram/node_modules/gensync/index.js:223:11)
at /home/juanpablo/intergram/node_modules/gensync/index.js:189:28
at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)
ERROR in ./src/widget/widget-index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Plugin/Preset files are not allowed to export objects, only functions. In /home/juanpablo/intergram/node_modules/babel-preset-es2015/lib/index.js
at createDescriptor (/home/juanpablo/intergram/node_modules/@babel/core/lib/config/config-descriptors.js:160:11)
at createDescriptor.next (<anonymous>)
at step (/home/juanpablo/intergram/node_modules/gensync/index.js:261:32)
at evaluateAsync (/home/juanpablo/intergram/node_modules/gensync/index.js:291:5)
at /home/juanpablo/intergram/node_modules/gensync/index.js:44:11
at Array.forEach (<anonymous>)
at Function.async (/home/juanpablo/intergram/node_modules/gensync/index.js:43:15)
at Function.all (/home/juanpablo/intergram/node_modules/gensync/index.js:216:13)
at Generator.next (<anonymous>)
at createDescriptors (/home/juanpablo/intergram/node_modules/@babel/core/lib/config/config-descriptors.js:102:41)
at createDescriptors.next (<anonymous>)
at createPresetDescriptors (/home/juanpablo/intergram/node_modules/@babel/core/lib/config/config-descriptors.js:96:17)
at createPresetDescriptors.next (<anonymous>)
at /home/juanpablo/intergram/node_modules/@babel/core/lib/gensync-utils/functional.js:21:23
at Generator.next (<anonymous>)
at mergeChainOpts (/home/juanpablo/intergram/node_modules/@babel/core/lib/config/config-chain.js:350:34)
at mergeChainOpts.next (<anonymous>)
at chainWalker (/home/juanpablo/intergram/node_modules/@babel/core/lib/config/config-chain.js:316:14)
at chainWalker.next (<anonymous>)
at loadFileChain (/home/juanpablo/intergram/node_modules/@babel/core/lib/config/config-chain.js:191:24)
at loadFileChain.next (<anonymous>)
at buildRootChain (/home/juanpablo/intergram/node_modules/@babel/core/lib/config/config-chain.js:108:31)
at buildRootChain.next (<anonymous>)
at loadPrivatePartialConfig (/home/juanpablo/intergram/node_modules/@babel/core/lib/config/partial.js:72:62)
at loadPrivatePartialConfig.next (<anonymous>)
at loadPartialConfig (/home/juanpablo/intergram/node_modules/@babel/core/lib/config/partial.js:115:25)
at loadPartialConfig.next (<anonymous>)
at step (/home/juanpablo/intergram/node_modules/gensync/index.js:269:25)
at /home/juanpablo/intergram/node_modules/gensync/index.js:273:13
at async.call.result.err.err (/home/juanpablo/intergram/node_modules/gensync/index.js:223:11)
at /home/juanpablo/intergram/node_modules/gensync/index.js:50:45
at step (/home/juanpablo/intergram/node_modules/gensync/index.js:287:14)
at /home/juanpablo/intergram/node_modules/gensync/index.js:273:13
at async.call.result.err.err (/home/juanpablo/intergram/node_modules/gensync/index.js:223:11)
at /home/juanpablo/intergram/node_modules/gensync/index.js:189:28
at /home/juanpablo/intergram/node_modules/@babel/core/lib/gensync-utils/async.js:67:7
at /home/juanpablo/intergram/node_modules/gensync/index.js:113:33
at step (/home/juanpablo/intergram/node_modules/gensync/index.js:287:14)
at /home/juanpablo/intergram/node_modules/gensync/index.js:273:13
at async.call.result.err.err (/home/juanpablo/intergram/node_modules/gensync/index.js:223:11)
at /home/juanpablo/intergram/node_modules/gensync/index.js:189:28
at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)
webpack 5.89.0 compiled with 2 errors in 1081 ms
npm ERR! code 1
npm ERR! path /home/juanpablo/intergram
npm ERR! command failed
npm ERR! command sh -c npm run build
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2023-12-13T13_57_36_018Z-debug-0.log
I am using node version v16.13.2 and 8.4.1. I have also tried with the newest node version.
So I followed as mentioned in a few issue threads the following article:
https://ictis-cz.translate.goog/telegram-chat-widget-self-hosted-debian-linux-intergram-github-skript-nodejs/?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=es-419
I did the changes to package.json and webpack.config.js, and run the different npm install --legacy-peer-deps and npm audit fix.
After running through the tutorial up to npm install terser, I am getting the following error:
I am using node version v16.13.2 and 8.4.1. I have also tried with the newest node version.
My package.json:
and my webpack.config.js: