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

Install failing on Windows due to fsevents #21

Closed
williamluke4 opened this issue Jan 14, 2018 · 8 comments
Closed

Install failing on Windows due to fsevents #21

williamluke4 opened this issue Jan 14, 2018 · 8 comments

Comments

@williamluke4
Copy link

λ truffle unbox adrianmcli/truffle-next
Downloading...
Unpacking...
Setting up...
Error: Command failed: cd client && npm install && npm run link-contracts
npm WARN client@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

ln: creating symbolic link `contracts' to `../../build/contracts': No such file or directory
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! client@1.0.0 link-contracts: `cd lib && ln -s ../../build/contracts contracts`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the client@1.0.0 link-contracts script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Work\AppData\Roaming\npm-cache\_logs\2018-01-14T15_52_15_906Z-debug.log

    at ChildProcess.exithandler (child_process.js:272:12)
    at ChildProcess.emit (events.js:160:13)
    at maybeClose (internal/child_process.js:943:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
@adrianmcli
Copy link
Owner

@williamluke4 thanks for reporting the issue. I haven't used Windows in almost 10 years, so I'm not sure how much I can help here. But it does look like the issue lies in the creation of the symlink. Unfortunately, I have no idea how symlinks would work with Windows.

@adrianmcli
Copy link
Owner

I should mention that you can just manually create the symlink and everything should work just fine.

@adrianmcli
Copy link
Owner

If anyone with a Windows computer is interested in helping, please submit a PR.

@lightswarm124
Copy link
Contributor

lightswarm124 commented Feb 8, 2018

Don't have a windows computer but perhaps this could provide some answers

https://stackoverflow.com/a/5549583

Something like:

cmd /d mklink c:\path\to\build\contract\JSON\folder c:\path\to\client\lib\contract\folder

@adrianmcli
Copy link
Owner

@lightswarm124 thanks, I think we'll need someone with an actual Windows machine to test out a cross-env way of doing this.

@adrianmcli
Copy link
Owner

We can probably use this package: https://github.com/charlesguse/run-script-os

We'll use a mklink command if the user's computer is a Windows machine, and for everything else, we will use the same ln -s command. This is a pretty straight-forward thing to implement, we just need someone with a Windows machine.

@williamluke4
Copy link
Author

#29 Fix Submitted but needs testing on Mac and Linux

@adrianmcli
Copy link
Owner

Unfortunately the fix from #29 removes the symlink and thus makes it not work on Mac and Linux. #29 also conflates this issue with trying to add Typescript to the project. As a result, I have closed #29.

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

No branches or pull requests

3 participants