Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

zos add error on Windows #608

Closed
KimiWu123 opened this issue Jan 28, 2019 · 2 comments
Closed

zos add error on Windows #608

KimiWu123 opened this issue Jan 28, 2019 · 2 comments
Assignees
Labels
kind:question A question to answer

Comments

@KimiWu123
Copy link

I followed this post to deploy my first zos project. When I called zos add MyContract, it shows

Could not find truffle in D:\01_code\side\zos\zos/node_modules/.bin/truffle. Please make sure you're placed in the right directory.

and there is indeed no truffle files in node_modules/.bin. I copied it and tried again. It shows

Error: Cannot find module 'D:\01_code\side\zos\mycontract\node_modules\truffle-core\cli.js'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Function.Module.runMain (module.js:694:10)
    at startup (bootstrap_node.js:204:16)
    at bootstrap_node.js:625:3

and then I copied truffle-core to D:\01_code\side\zos\mycontract\node_modules, and called zos add MyContract again. It shows another error,

Error: Cannot find module 'source-map-support/register'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (D:\01_code\side\zos\mycontract\node_modules\truffle-core\cli.js:2:1)
    ...

It keeps this kind of error. Do I miss any steps? It seems nodejs modules are not complete in node_modules folder. There is another story if I deploy on Mac...

zos version is 2.1.0.

@spalladino
Copy link
Contributor

Hey @KimiWu123! Instead of copying truffle-core, can you try running npm install truffle on your project? By the way, there is a release coming that will support truffle global installations.

@spalladino spalladino added the kind:question A question to answer label Jan 28, 2019
@spalladino spalladino self-assigned this Jan 28, 2019
@KimiWu123
Copy link
Author

Hi @spalladino , It's working! Thanks for your help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind:question A question to answer
Projects
None yet
Development

No branches or pull requests

2 participants