truffle icon indicating copy to clipboard operation
truffle copied to clipboard

I try to install the truffle but not installed

Open carnato opened this issue 2 years ago • 21 comments


Issue

What the issue is, in broad strokes.

Steps to Reproduce

Please provide the shortest amount of steps to reproduce your issue.

Expected Behavior

What you expected to happen.

Actual Results

What actually happened. Please give examples and support it with screenshots, copied output or error messages.

Environment

  • Operating System:
  • Ethereum client:
  • Truffle version (truffle version):
  • node version (node --version):
  • npm version (npm --version):

carnato avatar Aug 21 '22 13:08 carnato

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]: This module has been superseded by the multiformats module 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]: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated [email protected]: This module has been superseded by the multiformats module npm WARN deprecated [email protected]: This module has been superseded by the multiformats module 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]: 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]: This module has been superseded by the multiformats module npm WARN deprecated [email protected]: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future npm WARN deprecated [email protected]: This module has been superseded by the multiformats module

changed 565 packages, and audited 577 packages in 16m

88 packages are looking for funding run npm fund for details

10 moderate severity vulnerabilities

To address issues that do not require attention, run: npm audit fix

Some issues need review, and may require choosing a different dependency.

Run npm audit for details.

carnato avatar Aug 21 '22 13:08 carnato

Hey @carnato can you confirm you installed via npm install -g truffle?

Also, can you provide your npm and node versions? Find out by typing npm -v and node -v

cliffoo avatar Aug 21 '22 14:08 cliffoo

Yes I am using the npm i -g truffle command

Yes npm version ---: 8.1.2

node version:----v16.13.2 I try my best but the problem can not solve

and I open cmd in administration mode

carnato avatar Aug 21 '22 17:08 carnato

Ah ok can you try npm install -g npm@6, then npm install -g truffle again? No need to open anything in admin mode.

cliffoo avatar Aug 22 '22 15:08 cliffoo

Those are warnings that you are seeing printed and shouldn't affect installation. I think the installation was successful.

eggplantzzz avatar Aug 22 '22 15:08 eggplantzzz

But when I run command for checking truffle version then it show an error message

On Mon, 22 Aug 2022, 8:53 pm tyler, @.***> wrote:

Those are warnings that you are seeing printed and shouldn't affect installation. I think the installation was successful.

— Reply to this email directly, view it on GitHub https://github.com/trufflesuite/truffle/issues/5471#issuecomment-1222511820, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK3NDCUBFBAOHGSS2MEGDXTV2OLOTANCNFSM57E6GJSQ . You are receiving this because you were mentioned.Message ID: @.***>

carnato avatar Aug 22 '22 15:08 carnato

Can you help to share the error message from when you run truffle version?

lsqproduction avatar Aug 22 '22 15:08 lsqproduction

Sure but i take some time for sending

On Mon, 22 Aug 2022, 9:03 pm Liang Liang, @.***> wrote:

Can you help to share the error message from when you run truffle version?

— Reply to this email directly, view it on GitHub https://github.com/trufflesuite/truffle/issues/5471#issuecomment-1222525920, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK3NDCXH7AASH5AVWPZ6RJ3V2OMVBANCNFSM57E6GJSQ . You are receiving this because you were mentioned.Message ID: @.***>

carnato avatar Aug 22 '22 15:08 carnato

Can you help to share the error message from when you run truffle version?

of course see that : when I type the truffle version then shows an error like that 👍

'truffle' is not recognized as an internal or external command, operable program or batch file.

carnato avatar Sep 02 '22 04:09 carnato

Can you help to share the error message from when you run truffle version?

when I further try to install then show an error like that .

when I write this command on the cmd npm install -g truffle

npm notice npm notice New minor version of npm available! 8.1.2 -> 8.19.1 npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.19.1 npm notice Run npm install -g [email protected] to update! npm notice npm ERR! code EPERM npm ERR! syscall mkdir npm ERR! path C:\WINDOWS\system32'~.npm-global'\node_modules.truffle-IIApj8M9 npm ERR! errno -4048 npm ERR! Error: EPERM: operation not permitted, mkdir 'C:\WINDOWS\system32'~.npm-global'\node_modules.truffle-IIApj8M9' npm ERR! [Error: EPERM: operation not permitted, mkdir 'C:\WINDOWS\system32'~.npm-global'\node_modules.truffle-IIApj8M9'] { npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'mkdir', npm ERR! path: "C:\WINDOWS\system32\'~\.npm-global'\node_modules\.truffle-IIApj8M9" npm ERR! } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It's possible that the file was already in use (by a text editor or antivirus), npm ERR! or that you lack permissions to access it. npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Hp\AppData\Local\npm-cache_logs\2022-09-02T04_37_50_251Z-debug.log

carnato avatar Sep 02 '22 04:09 carnato

Hey @carnato can you try doing the following:

  1. npm uninstall -g truffle
  2. npm install -g npm@6
  3. npm install -g truffle, give it some time
  4. truffle version, does it execute OK?

cliffoo avatar Sep 02 '22 13:09 cliffoo

Okay I try and follow your instructions. The. See what happens😊

On Fri, 2 Sept 2022, 7:08 pm Cliff Zhang, @.***> wrote:

Hey @carnato https://github.com/carnato can you try doing the following:

  1. npm uninstall -g truffle
  2. npm install -g @.***
  3. npm install -g truffle, give it some time
  4. truffle version, does it execute OK?

— Reply to this email directly, view it on GitHub https://github.com/trufflesuite/truffle/issues/5471#issuecomment-1235517527, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK3NDCQCNKXYXNYCEEWLMELV4H7M5ANCNFSM57E6GJSQ . You are receiving this because you were mentioned.Message ID: @.***>

carnato avatar Sep 02 '22 15:09 carnato

  1. npm install -g truffle

node ./scripts/postinstall.js

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules\truffle\node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\truffle\node_modules\sqlite3): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: node-pre-gyp install --fallback-to-build npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

finally, show like that.

and after that, I used this cmd "truffle version" and same

show error like that. 'truffle' is not recognized as an internal or external command, operable program or batch file.

carnato avatar Sep 03 '22 11:09 carnato

what next I do

carnato avatar Sep 03 '22 11:09 carnato

Hey @carnato can you try doing the following:

  1. npm uninstall -g truffle
  2. npm install -g npm@6
  3. npm install -g truffle, give it some time
  4. truffle version, does it execute OK?

I follow your procedure but the problem not resolved.

carnato avatar Sep 03 '22 11:09 carnato

Hey @carnato can you try doing the following:

  1. npm uninstall -g truffle
  2. npm install -g npm@6
  3. npm install -g truffle, give it some time
  4. truffle version, does it execute OK?

when I run the npm i -g truffle then show.

[email protected] install C:\WINDOWS\system32'~.npm-global'\node_modules\truffle\node_modules\sqlite3 node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v93-win32-x64.tar.gz node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v93 ABI, unknown) (falling back to source compile with node-gyp) gyp ERR! find VS gyp ERR! find VS msvs_version not set from command line or npm config gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer gyp ERR! find VS looking for Visual Studio 2015 gyp ERR! find VS - not found gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8 gyp ERR! find VS gyp ERR! find VS ************************************************************** gyp ERR! find VS You need to install the latest version of Visual Studio gyp ERR! find VS including the "Desktop development with C++" workload. gyp ERR! find VS For more information consult the documentation at: gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows gyp ERR! find VS ************************************************************** gyp ERR! find VS gyp ERR! configure error gyp ERR! stack Error: Could not find any Visual Studio installation to use gyp ERR! stack at VisualStudioFinder.fail (C:\WINDOWS\system32'~.npm-global'\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47) gyp ERR! stack at C:\WINDOWS\system32'~.npm-global'\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16 gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\WINDOWS\system32'~.npm-global'\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14) gyp ERR! stack at C:\WINDOWS\system32'~.npm-global'\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14 gyp ERR! stack at C:\WINDOWS\system32'~.npm-global'\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16 gyp ERR! stack at C:\WINDOWS\system32'~.npm-global'\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7 gyp ERR! stack at C:\WINDOWS\system32'~.npm-global'\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16 gyp ERR! stack at ChildProcess.exithandler (node:child_process:404:5) gyp ERR! stack at ChildProcess.emit (node:events:390:28) gyp ERR! stack at maybeClose (node:internal/child_process:1064:16) gyp ERR! System Windows_NT 10.0.19042 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\WINDOWS\system32\'~\.npm-global'\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\WINDOWS\system32\'~\.npm-global'\node_modules\truffle\node_modules\sqlite3\lib\binding\node-v93-win32-x64\node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=C:\WINDOWS\system32\'~\.npm-global'\node_modules\truffle\node_modules\sqlite3\lib\binding\node-v93-win32-x64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93" gyp ERR! cwd C:\WINDOWS\system32'~.npm-global'\node_modules\truffle\node_modules\sqlite3 gyp ERR! node -v v16.13.2 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\WINDOWS\system32'~.npm-global'\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\WINDOWS\system32'~.npm-global'\node_modules\truffle\node_modules\sqlite3\lib\binding\node-v93-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\WINDOWS\system32'~.npm-global'\node_modules\truffle\node_modules\sqlite3\lib\binding\node-v93-win32-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1) node-pre-gyp ERR! stack at ChildProcess. (C:\Windows\System32'~.npm-global'\node_modules\truffle\node_modules\node-pre-gyp\lib\util\compile.js:83:29) node-pre-gyp ERR! stack at ChildProcess.emit (node:events:390:28) node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1064:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5) node-pre-gyp ERR! System Windows_NT 10.0.19042 node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Windows\System32\'~\.npm-global'\node_modules\truffle\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd C:\WINDOWS\system32'~.npm-global'\node_modules\truffle\node_modules\sqlite3 node-pre-gyp ERR! node -v v16.13.2 node-pre-gyp ERR! node-pre-gyp -v v0.11.0 node-pre-gyp ERR! not ok Failed to execute 'C:\Program Files\nodejs\node.exe C:\WINDOWS\system32'~.npm-global'\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\WINDOWS\system32'~.npm-global'\node_modules\truffle\node_modules\sqlite3\lib\binding\node-v93-win32-x64\node_sqlite3.node --module_name=node_sqlite3 --module_path=C:\WINDOWS\system32'~.npm-global'\node_modules\truffle\node_modules\sqlite3\lib\binding\node-v93-win32-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)

@apollo/[email protected] postinstall C:\WINDOWS\system32'~.npm-global'\node_modules\truffle\node_modules@apollo\protobufjs node scripts/postinstall

[email protected] postinstall C:\WINDOWS\system32'~.npm-global'\node_modules\truffle\node_modules\es5-ext node -e "try{require('./_postinstall')}catch(e){}" || exit 0

[email protected] postinstall C:\WINDOWS\system32'~.npm-global'\node_modules\truffle\node_modules\web3-shh echo "WARNING: the web3-shh api will be deprecated in the next version"

"WARNING: the web3-shh api will be deprecated in the next version"

[email protected] postinstall C:\WINDOWS\system32'~.npm-global'\node_modules\truffle\node_modules\web3-bzz echo "WARNING: the web3-bzz api will be deprecated in the next version"

"WARNING: the web3-bzz api will be deprecated in the next version"

[email protected] postinstall C:\WINDOWS\system32'~.npm-global'\node_modules\truffle\node_modules\web3 echo "WARNING: the web3-shh and web3-bzz api will be deprecated in the next version"

"WARNING: the web3-shh and web3-bzz api will be deprecated in the next version"

carnato avatar Sep 03 '22 12:09 carnato

I also, recognize one more point. can you explain what I can do?

You need to install the latest version of Visual Studio gyp ERR! find VS including the "Desktop development with C++" workload. gyp ERR! find VS For more information consult the documentation at: gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows

carnato avatar Sep 03 '22 13:09 carnato

Ok yes you need the build tools. I realized that we have a pretty thorough windows guide so I'm going to redirect you there. Can you try following that and let me know if you're able to install? @carnato

cliffoo avatar Sep 03 '22 15:09 cliffoo

Ok yes you need the build tools. I realized that we have a pretty thorough windows guide so I'm going to redirect you there. Can you try following that and let me know if you're able to install? @carnato

Then plz guide me

carnato avatar Sep 03 '22 15:09 carnato

can

carnato avatar Sep 03 '22 16:09 carnato

@carnato was the windows guide helpful for your needs? I see you reopened this issue and wanted to check in on whether we can help. Thanks!

fainashalts avatar Sep 07 '22 21:09 fainashalts

Closing for issue maintenance.

cliffoo avatar Oct 13 '22 17:10 cliffoo

Thanks for your support. But my problem no resolve

On Thu, 13 Oct 2022, 10:44 pm Cliff Zhang, @.***> wrote:

Closed #5471 https://github.com/trufflesuite/truffle/issues/5471 as completed.

— Reply to this email directly, view it on GitHub https://github.com/trufflesuite/truffle/issues/5471#event-7583489240, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK3NDCV3UAWREPLKVQ2GGUTWDA7QZANCNFSM57E6GJSQ . You are receiving this because you were mentioned.Message ID: @.***>

carnato avatar Oct 14 '22 04:10 carnato