SmartAgentProtocol / SmartAgents

Open Source Chat Interface For Web3 Wallets, Dapps, & Smart Contracts
https://app.ens.domains/smartagents.eth
MIT License
35 stars 16 forks source link

Webpack issues #15

Closed betterbrand closed 1 year ago

betterbrand commented 1 year ago
  1. node fires up with node index.js from the frontend directory
  2. client starts with yarn start and from the client directory.
  3. localhost opens without fail
  4. The prompts are working, Seems like my webpack is unhappy about something. I have updated and installed it in every directory involved.

SmartAI Agent Frontend 2023-06-07 12-49-01

The only issue is from webpack in the terminal

Failed to parse source map: 'webpack:///../../src.ts/coders/abstract-coder.ts' URL is not supported

Failed to parse source map: 'webpack:///../../src.ts/coders/address.ts' URL is not supported

Failed to parse source map: 'webpack:///../../src.ts/coders/anonymous.ts' URL is not supported

Failed to parse source map: 'webpack:///../../src.ts/coders/array.ts' URL is not supported

Failed to parse source map: 'webpack:///../../src.ts/coders/boolean.ts' URL is not supported

Failed to parse source map: 'webpack:///../../src.ts/coders/bytes.ts' URL is not supported

Failed to parse source map: 'webpack:///../../src.ts/coders/fixed-bytes.ts' URL is not supported

Failed to parse source map: 'webpack:///../../src.ts/coders/null.ts' URL is not supported

Failed to parse source map: 'webpack:///../../src.ts/coders/number.ts' URL is not supported

Failed to parse source map: 'webpack:///../../src.ts/coders/string.ts' URL is not supported

Failed to parse source map: 'webpack:///../../src.ts/coders/tuple.ts' URL is not supported

Failed to parse source map: 'webpack:///../../src.ts/ens-normalize/decoder.ts' URL is not supported

Failed to parse source map: 'webpack:///../../src.ts/ens-normalize/include.ts' URL is not supported

Failed to parse source map: 'webpack:///../../src.ts/ens-normalize/lib.ts' URL is not supported

Failed to parse source map: 'webpack:///../../src/chains/index.ts' URL is not supported

Failed to parse source map: 'webpack:///../../src/eips/index.ts' URL is not supported

Failed to parse source map: 'webpack:///../../src/hardforks/index.ts' URL is not supported

Failed to parse source map: 'webpack:///../src.ts/_version.ts' URL is not supported

Failed to parse source map: 'webpack:///../src.ts/abi-coder.ts' URL is not supported

Failed to parse source map: 'webpack:///../src.ts/addresses.ts' URL is not supported

Failed to parse source map: 'webpack:///../src.ts/bignumber.ts' URL is not supported

Failed to parse source map: 'webpack:///../src.ts/bignumbers.ts' URL is not supported

Failed to parse source map: 'webpack:///../src.ts/browser-base64.ts' URL is not supported

Failed to parse source map: 'webpack:///../src.ts/bytes32.ts' URL is not supported

Failed to parse source map: 'webpack:///../src.ts/fixednumber.ts' URL is not supported

Failed to parse source map: 'webpack:///../src.ts/fragments.ts' URL is not supported

Failed to parse source map: 'webpack:///../src.ts/hashes.ts' URL is not supported

Failed to parse source map: 'webpack:///../src.ts/id.ts' URL is not supported

Failed to parse source map: 'webpack:///../src.ts/idna.ts' URL is not supported

Failed to parse source map: 'webpack:///../src.ts/index.ts' URL is not supported

Failed to parse source map: 'webpack:///../src.ts/interface.ts' URL is not supported

Failed to parse source map: 'webpack:///../src.ts/message.ts' URL is not supported

Failed to parse source map: 'webpack:///../src.ts/namehash.ts' URL is not supported

Failed to parse source map: 'webpack:///../src.ts/strings.ts' URL is not supported

Failed to parse source map: 'webpack:///../src.ts/typed-data.ts' URL is not supported

Failed to parse source map: 'webpack:///../src.ts/utf8.ts' URL is not supported

Failed to parse source map: 'webpack:///../src/account.ts' URL is not supported

Failed to parse source map: 'webpack:///../src/address.ts' URL is not supported

Failed to parse source map: 'webpack:///../src/baseTransaction.ts' URL is not supported

Failed to parse source map: 'webpack:///../src/bytes.ts' URL is not supported

Failed to parse source map: 'webpack:///../src/constants.ts' URL is not supported

Failed to parse source map: 'webpack:///../src/eip1559Transaction.ts' URL is not supported

Failed to parse source map: 'webpack:///../src/eip2930Transaction.ts' URL is not supported

Failed to parse source map: 'webpack:///../src/externals.ts' URL is not supported

Failed to parse source map: 'webpack:///../src/hash.ts' URL is not supported

Failed to parse source map: 'webpack:///../src/helpers.ts' URL is not supported

Failed to parse source map: 'webpack:///../src/index.ts' URL is not supported

Failed to parse source map: 'webpack:///../src/internal.ts' URL is not supported

Failed to parse source map: 'webpack:///../src/legacyTransaction.ts' URL is not supported

Failed to parse source map: 'webpack:///../src/object.ts' URL is not supported

Failed to parse source map: 'webpack:///../src/signature.ts' URL is not supported

Failed to parse source map: 'webpack:///../src/transactionFactory.ts' URL is not supported

Failed to parse source map: 'webpack:///../src/types.ts' URL is not supported

Failed to parse source map: 'webpack:///../src/util.ts' URL is not supported

Failed to parse source map: 'webpack:///src/hash-utils.ts' URL is not supported

Failed to parse source map: 'webpack:///src/keccak.ts' URL is not supported

Failed to parse source map: 'webpack:///src/random.ts' URL is not supported

Failed to parse source map: 'webpack:///src/secp256k1.ts' URL is not supported

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../../src.ts/coders/abstract-coder.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../../src.ts/coders/address.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../../src.ts/coders/anonymous.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../../src.ts/coders/array.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../../src.ts/coders/boolean.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../../src.ts/coders/bytes.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../../src.ts/coders/fixed-bytes.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../../src.ts/coders/null.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../../src.ts/coders/number.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../../src.ts/coders/string.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../../src.ts/coders/tuple.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../../src.ts/ens-normalize/decoder.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../../src.ts/ens-normalize/include.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../../src.ts/ens-normalize/lib.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../../src/chains/index.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../../src/eips/index.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../../src/hardforks/index.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src.ts/_version.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src.ts/abi-coder.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src.ts/addresses.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src.ts/bignumber.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src.ts/bignumbers.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src.ts/browser-base64.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src.ts/bytes32.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src.ts/fixednumber.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src.ts/fragments.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src.ts/hashes.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src.ts/id.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src.ts/idna.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src.ts/index.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src.ts/interface.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src.ts/message.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src.ts/namehash.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src.ts/strings.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src.ts/typed-data.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src.ts/utf8.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src/account.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src/address.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src/baseTransaction.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src/bytes.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src/constants.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src/eip1559Transaction.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src/eip2930Transaction.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src/externals.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src/hash.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src/helpers.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src/index.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src/internal.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src/legacyTransaction.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src/object.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src/signature.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src/transactionFactory.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src/types.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///../src/util.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///src/hash-utils.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///src/keccak.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///src/random.ts' URL is not supported

WARNING in ./node_modules/web3/dist/web3.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map: 'webpack:///src/secp256k1.ts' URL is not supported

webpack compiled with 58 warnings
betterbrand commented 1 year ago

Still having this issue:

When following the readme in /frontend, I first yarn in the root directory. This is what gets returned:

ChatBox js — SmartAgentCore 2023-06-27 13-31-12

(base) scottberenzweig@desktop-mac SmartAgentCore % node index.js
node:internal/modules/cjs/loader:1085
  throw err;
  ^

Error: Cannot find module '/Users/scottberenzweig/Documents/GitHub/SmartAgentCore/index.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1082:15)
    at Module._load (node:internal/modules/cjs/loader:928:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v20.0.0
(base) scottberenzweig@desktop-mac SmartAgentCore % 
betterbrand commented 1 year ago

after going through readme, this is the result. Is this related or separate from the post above?

SmartAI Agent Frontend 2023-06-27 13-39-53

Uncaught runtime errors: × ERROR Failed to fetch TypeError: Failed to fetch at getEngines (http://localhost:3000/static/js/bundle.js:53:5) at http://localhost:3000/static/js/bundle.js:36:5 at commitHookEffectListMount (http://localhost:3000/static/js/bundle.js:27603:30) at commitPassiveMountOnFiber (http://localhost:3000/static/js/bundle.js:29096:17) at commitPassiveMountEffects_complete (http://localhost:3000/static/js/bundle.js:29068:13) at commitPassiveMountEffects_begin (http://localhost:3000/static/js/bundle.js:29058:11) at commitPassiveMountEffects (http://localhost:3000/static/js/bundle.js:29048:7) at flushPassiveEffectsImpl (http://localhost:3000/static/js/bundle.js:30933:7) at flushPassiveEffects (http://localhost:3000/static/js/bundle.js:30885:18) at http://localhost:3000/static/js/bundle.js:30700:13