Code Monkey home page Code Monkey logo

Comments (10)

explodingcamera avatar explodingcamera commented on May 9, 2024 1

You can't run bash (Unix/Linux) scripts on windows by default if you're not running something like wsl (Windows Subsystem for Linux) or GIT Bash. I think using os-specific scripts/commands and copying stuff to some folder outside of node_modules is a bad Idea, you should convert your bash scripts to js files and add the moving of folders as part of a global commad, for example zeppelin init if users want to use that.

I'm currently running on windows so I could do a pr if you want.

As temp workaround you can also use npm install zeppelin-solidity --ignore-scripts to skip the post-install script.

from openzeppelin-contracts.

maraoz avatar maraoz commented on May 9, 2024 1

@explodingcamera Thanks for the info.
The post-install script should be gone once we move to ethpm, so that should also fix this problem.
No need to do what you suggested, in my opinion :)

from openzeppelin-contracts.

maraoz avatar maraoz commented on May 9, 2024

@rfikki thanks for reporting. Seems like a problem with how windows handles paths.

Can you try changing this line: https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/package.json#L12
to something like:

"install": "./scripts/install.sh"

Or however windows recognizes the path? (sorry, I don't have much experience with windows development)
Let me know

from openzeppelin-contracts.

maraoz avatar maraoz commented on May 9, 2024

@rfikki any update on this? Would like to help

from openzeppelin-contracts.

OnlyOneJMJQ avatar OnlyOneJMJQ commented on May 9, 2024

@maraoz I added that as well as tried added exec in front of the path:
exec ./scripts/install.sh

Neither worked unfortunately. I've been researching other ways of moving files post-npm-install to try and create a helpful pull request, but am not having much luck yet.

Edit: I should note I'm executing this with PowerShell on Windows 10.

from openzeppelin-contracts.

ProphetDaniel avatar ProphetDaniel commented on May 9, 2024

To get rid of the errors we were having before we started powershell as admin and run the following command line:

npm install zeppelin-solidity --ignore-scripts

The result was:

`-- [email protected]
  `-- [email protected]
    +-- [email protected]
    | `-- [email protected]  (git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2)
    `-- [email protected]
      `-- [email protected]
        `-- [email protected]  (git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2)

npm WARN enoent ENOENT: no such file or directory, open 'C:\WINDOWS\system32\package.json'
npm WARN system32 No description
npm WARN system32 No repository field.
npm WARN system32 No README data
npm WARN system32 No license field.

To get rid of the warnings we added a package.json file with the following content to WINDOWS\System32:

{
  "description": "Holding package.json",
  "repository": {
    "type": "git",
    "url": "A repository path"
  },
  "license": "MIT"
}

Finally the open zeppelin package installed without any errors or warnings. To be tested now though.

C:\WINDOWS\system32> npm install zeppelin-solidity --ignore-scripts
C:\WINDOWS\system32
`-- [email protected]
  `-- [email protected]
    +-- [email protected]
    | `-- [email protected]  (git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2)
    `-- [email protected]
      `-- [email protected]
        `-- [email protected]  (git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2)

from openzeppelin-contracts.

ProphetDaniel avatar ProphetDaniel commented on May 9, 2024

After issueing the truffle install zeppelin command just after truffle init inside a new folder:
Unfortunately the following error is raised:

Secp256k1 bindings are not compiled. Pure JS implementation will be used.
Error: Could not find object at hash 'QmYt6ZfD1VNmKp85TeteEcsgaxHzP2gTSKupHxHMVgcHYb' in 5000ms
    at Timeout._onTimeout (C:\Users\user\AppData\Roaming\npm\node_modules\truffle\node_modules\ethpm\lib\hosts\ipfshost.
js:47:14)
    at ontimeout (timers.js:386:14)
    at tryOnTimeout (timers.js:250:5)
    at Timer.listOnTimeout (timers.js:214:5)

from openzeppelin-contracts.

maraoz avatar maraoz commented on May 9, 2024

This is a known issue with IPFS, sorry: #209
We're working on fixing it

from openzeppelin-contracts.

rstormsf avatar rstormsf commented on May 9, 2024

this issue could be fixed when #253 is deployed to npm, correct?

from openzeppelin-contracts.

frangio avatar frangio commented on May 9, 2024

This is obsolete as scripts/install.sh was removed (#272). If there are any newer installation problems on Windows please open a new issue.

from openzeppelin-contracts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.