Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working #41

Open
xplorer990 opened this issue Jul 22, 2022 · 1 comment
Open

Not working #41

xplorer990 opened this issue Jul 22, 2022 · 1 comment

Comments

@xplorer990
Copy link

''npm install'' gives the following.

`C:\Users\username\Documents\Dapp\price-bot

Mode LastWriteTime Length Name


-a--- 7/22/2022 3:08 AM 91 .env.example
-a--- 7/22/2022 3:08 AM 100 .gitignore
-a--- 7/22/2022 3:08 AM 21756 index.js
-a--- 7/22/2022 3:08 AM 203037 package-lock.json
-a--- 7/22/2022 3:08 AM 691 package.json

PS C:\Users\username\Documents\Dapp\price-bot> npm install
npm WARN config global --global, --local are deprecated. Use --location=global instead.
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN old lockfile Error: git dep preparation failed
npm WARN old lockfile at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\promise-spawn\lib\index.js:63:27)
npm WARN old lockfile at ChildProcess.emit (node:events:527:28)
npm WARN old lockfile at maybeClose (node:internal/child_process:1092:16)
npm WARN old lockfile at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm WARN old lockfile Could not fetch metadata for web3-provider-engine@git+ssh://[email protected]/trufflesuite/provider-engine.git#3538c60bc4836b73ccae1ac3f64c8fed8ef19c1a Error: git dep preparation failed
npm WARN old lockfile at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\promise-spawn\lib\index.js:63:27)
npm WARN old lockfile at ChildProcess.emit (node:events:527:28)
npm WARN old lockfile at maybeClose (node:internal/child_process:1092:16)
npm WARN old lockfile at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) {
npm WARN old lockfile cmd: 'C:\Program Files\nodejs\node.exe',
npm WARN old lockfile args: [
npm WARN old lockfile 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
npm WARN old lockfile 'install',
npm WARN old lockfile '--force',
npm WARN old lockfile '--cache=C:\Users\username\AppData\Local\npm-cache',
npm WARN old lockfile '--prefer-offline=false',
npm WARN old lockfile '--prefer-online=false',
npm WARN old lockfile '--offline=false',
npm WARN old lockfile '--no-progress',
npm WARN old lockfile '--no-save',
npm WARN old lockfile '--no-audit',
npm WARN old lockfile '--include=dev',
npm WARN old lockfile '--include=peer',
npm WARN old lockfile '--include=optional',
npm WARN old lockfile '--no-package-lock-only',
npm WARN old lockfile '--no-dry-run'
npm WARN old lockfile ],
npm WARN old lockfile code: 1,
npm WARN old lockfile signal: null,
npm WARN old lockfile stdout: '\n' +
npm WARN old lockfile '> [email protected] prepublish\n' +
npm WARN old lockfile '> npm run build && npm run bundle\n' +
npm WARN old lockfile '\n' +
npm WARN old lockfile '\n' +
npm WARN old lockfile '> [email protected] build\n' +
npm WARN old lockfile '> babel zero.js index.js -d dist/es5 && babel subproviders -d dist/es5/subproviders && babel util -d dist/es5/util\n' +
npm WARN old lockfile '\n' +
npm WARN old lockfile 'zero.js -> dist\es5\zero.js\n' +
npm WARN old lockfile 'index.js -> dist\es5\index.js\n' +
npm WARN old lockfile 'subproviders\cache.js -> dist\es5\subproviders\cache.js\n' +
npm WARN old lockfile 'subproviders\default-fixture.js -> dist\es5\subproviders\default-fixture.js\n' +
npm WARN old lockfile 'subproviders\etherscan.js -> dist\es5\subproviders\etherscan.js\n' +
npm WARN old lockfile 'subproviders\fetch.js -> dist\es5\subproviders\fetch.js\n' +
npm WARN old lockfile 'subproviders\filters.js -> dist\es5\subproviders\filters.js\n' +
npm WARN old lockfile 'subproviders\fixture.js -> dist\es5\subproviders\fixture.js\n' +
npm WARN old lockfile 'subproviders\gasprice.js -> dist\es5\subproviders\gasprice.js\n' +
npm WARN old lockfile 'subproviders\hooked-wallet-ethtx.js -> dist\es5\subproviders\hooked-wallet-ethtx.js\n' +
npm WARN old lockfile 'subproviders\hooked-wallet.js -> dist\es5\subproviders\hooked-wallet.js\n' +
npm WARN old lockfile 'subproviders\inflight-cache.js -> dist\es5\subproviders\inflight-cache.js\n' +
npm WARN old lockfile 'subproviders\infura.js -> dist\es5\subproviders\infura.js\n' +
npm WARN old lockfile 'subproviders\ipc.js -> dist\es5\subproviders\ipc.js\n' +
npm WARN old lockfile 'subproviders\nonce-tracker.js -> dist\es5\subproviders\nonce-tracker.js\n' +
npm WARN old lockfile 'subproviders\provider.js -> dist\es5\subproviders\provider.js\n' +
npm WARN old lockfile 'subproviders\rpc.js -> dist\es5\subproviders\rpc.js\n' +
npm WARN old lockfile 'subproviders\sanitizer.js -> dist\es5\subproviders\sanitizer.js\n' +
npm WARN old lockfile 'subproviders\stream.js -> dist\es5\subproviders\stream.js\n' +
npm WARN old lockfile 'subproviders\subprovider.js -> dist\es5\subproviders\subprovider.js\n' +
npm WARN old lockfile 'subproviders\subscriptions.js -> dist\es5\subproviders\subscriptions.js\n' +
npm WARN old lockfile 'subproviders\vm.js -> dist\es5\subproviders\vm.js\n' +
npm WARN old lockfile 'subproviders\wallet.js -> dist\es5\subproviders\wallet.js\n' +
npm WARN old lockfile 'subproviders\websocket.js -> dist\es5\subproviders\websocket.js\n' +
npm WARN old lockfile 'subproviders\whitelist.js -> dist\es5\subproviders\whitelist.js\n' +
npm WARN old lockfile 'util\assert.js -> dist\es5\util\assert.js\n' +
npm WARN old lockfile 'util\async.js -> dist\es5\util\async.js\n' +
npm WARN old lockfile 'util\create-payload.js -> dist\es5\util\create-payload.js\n' +
npm WARN old lockfile 'util\estimate-gas.js -> dist\es5\util\estimate-gas.js\n' +
npm WARN old lockfile 'util\random-id.js -> dist\es5\util\random-id.js\n' +
npm WARN old lockfile 'util\rpc-cache-utils.js -> dist\es5\util\rpc-cache-utils.js\n' +
npm WARN old lockfile 'util\rpc-hex-encoding.js -> dist\es5\util\rpc-hex-encoding.js\n' +
npm WARN old lockfile 'util\stoplight.js -> dist\es5\util\stoplight.js\n' +
npm WARN old lockfile '\n' +
npm WARN old lockfile '> [email protected] bundle\n' +
npm WARN old lockfile '> mkdir -p ./dist && npm run bundle-engine && npm run bundle-zero\n' +
npm WARN old lockfile '\n',
npm WARN old lockfile stderr: 'npm WARN using --force Recommended protections disabled.\n' +
npm WARN old lockfile 'npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated\n' +
npm WARN old lockfile 'npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated\n' +
npm WARN old lockfile 'npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated\n' +
npm WARN old lockfile 'npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated\n' +
npm WARN old lockfile 'npm WARN deprecated [email protected]: this library is no longer supported\n' +
npm WARN old lockfile 'npm WARN deprecated [email protected]: Renamed to @metamask/safe-event-emitter\n' +
npm WARN old lockfile 'npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.\n' +
npm WARN old lockfile 'npm WARN deprecated [email protected]: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!\n' +
npm WARN old lockfile 'npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.\n' +
npm WARN old lockfile "npm WARN deprecated [email protected]: Deprecated in favor of '@metamask/eth-sig-util'\n" +
npm WARN old lockfile 'npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.\n' +
npm WARN old lockfile 'npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/block. Please update.\n' +
npm WARN old lockfile 'npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/tx. Please update.\n' +
npm WARN old lockfile 'npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142\n' +
npm WARN old lockfile 'npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/tx. Please update.\n' +
npm WARN old lockfile 'npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/block. Please update.\n' +
npm WARN old lockfile 'npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/vm. Please update.\n' +
npm WARN old lockfile 'npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/common. Please update.\n' +
npm WARN old lockfile 'npm WARN deprecated [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.\n' +
npm WARN old lockfile 'npm WARN config global --global, --local are deprecated. Use --location=global instead.\n' +
npm WARN old lockfile 'npm WARN using --force Recommended protections disabled.\n' +
npm WARN old lockfile 'npm WARN using --force Recommended protections disabled.\n' +
npm WARN old lockfile 'npm WARN config global --global, --local are deprecated. Use --location=global instead.\n' +
npm WARN old lockfile 'npm WARN using --force Recommended protections disabled.\n' +
npm WARN old lockfile 'npm WARN using --force Recommended protections disabled.\n' +
npm WARN old lockfile 'The syntax of the command is incorrect.\r\n' +
npm WARN old lockfile 'npm ERR! code 1\n' +
npm WARN old lockfile 'npm ERR! path C:\Users\username\AppData\Local\npm-cache\_cacache\tmp\git-cloneg5Urm9\n' +
npm WARN old lockfile 'npm ERR! command failed\n' +
npm WARN old lockfile 'npm ERR! command C:\Windows\system32\cmd.exe /d /s /c npm run build && npm run bundle\n' +
npm WARN old lockfile '\n' +
npm WARN old lockfile 'npm ERR! A complete log of this run can be found in:\n' +
npm WARN old lockfile 'npm ERR! C:\Users\username\AppData\Local\npm-cache\_logs\2022-07-22T01_36_51_845Z-debug-0.log\n'
npm WARN old lockfile }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '10.x' },
npm WARN EBADENGINE current: { node: 'v16.16.0', npm: '8.11.0' }
npm WARN EBADENGINE }
npm WARN deprecated [email protected]: Renamed to @metamask/safe-event-emitter
npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/block. Please update.
npm WARN deprecated [email protected]: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/tx. Please update.
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142
npm WARN deprecated [email protected]: Deprecated in favor of '@metamask/eth-sig-util'
npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/tx. Please update.
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/block. Please update.
npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/vm. Please update.
npm WARN deprecated [email protected]: Critical security vulnerability fixed in v0.21.1. For more information, see axios/axios#3410
npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/common. Please update.
npm WARN deprecated [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm notice
npm notice New minor version of npm available! 8.11.0 -> 8.15.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.15.0
npm notice Run npm install -g [email protected] to update!
npm notice
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js install --force --cache=C:\Users\username\AppData\Local\npm-cache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! > [email protected] prepublish
npm ERR! > npm run build && npm run bundle
npm ERR!
npm ERR!
npm ERR! > [email protected] build
npm ERR! > babel zero.js index.js -d dist/es5 && babel subproviders -d dist/es5/subproviders && babel util -d dist/es5/util
npm ERR!
npm ERR! zero.js -> dist\es5\zero.js
npm ERR! index.js -> dist\es5\index.js
npm ERR! subproviders\cache.js -> dist\es5\subproviders\cache.js
npm ERR! subproviders\default-fixture.js -> dist\es5\subproviders\default-fixture.js
npm ERR! subproviders\etherscan.js -> dist\es5\subproviders\etherscan.js
npm ERR! subproviders\fetch.js -> dist\es5\subproviders\fetch.js
npm ERR! subproviders\filters.js -> dist\es5\subproviders\filters.js
npm ERR! subproviders\fixture.js -> dist\es5\subproviders\fixture.js
npm ERR! subproviders\gasprice.js -> dist\es5\subproviders\gasprice.js
npm ERR! subproviders\hooked-wallet-ethtx.js -> dist\es5\subproviders\hooked-wallet-ethtx.js
npm ERR! subproviders\hooked-wallet.js -> dist\es5\subproviders\hooked-wallet.js
npm ERR! subproviders\inflight-cache.js -> dist\es5\subproviders\inflight-cache.js
npm ERR! subproviders\infura.js -> dist\es5\subproviders\infura.js
npm ERR! subproviders\ipc.js -> dist\es5\subproviders\ipc.js
npm ERR! subproviders\nonce-tracker.js -> dist\es5\subproviders\nonce-tracker.js
npm ERR! subproviders\provider.js -> dist\es5\subproviders\provider.js
npm ERR! subproviders\rpc.js -> dist\es5\subproviders\rpc.js
npm ERR! subproviders\sanitizer.js -> dist\es5\subproviders\sanitizer.js
npm ERR! subproviders\stream.js -> dist\es5\subproviders\stream.js
npm ERR! subproviders\subprovider.js -> dist\es5\subproviders\subprovider.js
npm ERR! subproviders\subscriptions.js -> dist\es5\subproviders\subscriptions.js
npm ERR! subproviders\vm.js -> dist\es5\subproviders\vm.js
npm ERR! subproviders\wallet.js -> dist\es5\subproviders\wallet.js
npm ERR! subproviders\websocket.js -> dist\es5\subproviders\websocket.js
npm ERR! subproviders\whitelist.js -> dist\es5\subproviders\whitelist.js
npm ERR! util\assert.js -> dist\es5\util\assert.js
npm ERR! util\async.js -> dist\es5\util\async.js
npm ERR! util\create-payload.js -> dist\es5\util\create-payload.js
npm ERR! util\estimate-gas.js -> dist\es5\util\estimate-gas.js
npm ERR! util\random-id.js -> dist\es5\util\random-id.js
npm ERR! util\rpc-cache-utils.js -> dist\es5\util\rpc-cache-utils.js
npm ERR! util\rpc-hex-encoding.js -> dist\es5\util\rpc-hex-encoding.js
npm ERR! util\stoplight.js -> dist\es5\util\stoplight.js
npm ERR!
npm ERR! > [email protected] bundle
npm ERR! > mkdir -p ./dist && npm run bundle-engine && npm run bundle-zero
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm WARN deprecated [email protected]: Renamed to @metamask/safe-event-emitter
npm ERR! npm WARN deprecated [email protected]: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!
npm ERR! npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated
npm ERR! npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm ERR! npm WARN deprecated [email protected]: this library is no longer supported
npm ERR! npm WARN deprecated [email protected]: Deprecated in favor of '@metamask/eth-sig-util'
npm ERR! npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm ERR! npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm ERR! npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm ERR! npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/block. Please update.
npm ERR! npm WARN deprecated [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm ERR! npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/tx. Please update.
npm ERR! npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm ERR! npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142
npm ERR! npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/tx. Please update.
npm ERR! npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/block. Please update.
npm ERR! npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/vm. Please update.
npm ERR! npm WARN deprecated [email protected]: New package name format for new versions: @ethereumjs/common. Please update.
npm ERR! npm WARN deprecated [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm ERR! npm WARN config global --global, --local are deprecated. Use --location=global instead.
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm WARN config global --global, --local are deprecated. Use --location=global instead.
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! The syntax of the command is incorrect.
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path C:\Users\username\AppData\Local\npm-cache_cacache\tmp\git-cloneCvu5ow
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command C:\Windows\system32\cmd.exe /d /s /c npm run build && npm run bundle
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! C:\Users\username\AppData\Local\npm-cache_logs\2022-07-22T01_38_22_408Z-debug-0.log

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\username\AppData\Local\npm-cache_logs\2022-07-22T01_36_34_851Z-debug-0.log`

How to resolve this? Can the code be updated please or tell me what to do. I would really appreciate it.

Also ''npm start'' results in the following but I assume this happens since the ''npm install'' gave all those errors.

PS C:\Users\username\Documents\Dapp\price-bot> npm run start npm WARN config global --global, --localare deprecated. Use--location=global` instead.

[email protected] start
node index.js

node:internal/modules/cjs/loader:936
throw err;
^

Error: Cannot find module 'dotenv'
Require stack:

  • C:\Users\username\Documents\Dapp\price-bot\index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object. (C:\Users\username\Documents\Dapp\price-bot\index.js:1:1)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [ 'C:\Users\username\Documents\Dapp\price-bot\index.js' ]`
@JReeGene
Copy link

wipe out the node module folder, delete package-lock.json but leave the package.json.
Run npm install and npm update to update any older packages.
Run npm cache clear --force
Run npm install dotenv.

it worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants