Open ddw360 opened 5 years ago
Was able to get this to work. See pastebin link (https://pastebin.com/GkqTm16Q). Fix was to make sure "hc.exe" and "libzmq-v140-mt-4_*.dll" directory was in command environment path instead of using absolute reference.
so this is resolved for you @ddw360 ?
I am having the same issue.
C:\Users\delroh\dev\Aprueba\hc\todo-list>hc test
[1;32mPackaging[0m files for testing to file: "C:\\Users\\delroh\\dev\\Aprueba\\hc\\todo-list\\dist\\todo-list.dna.json"
> cargo build --release --target=wasm32-unknown-unknown --target-dir=target
Finished release [optimized] target(s) in 5.78s
> cargo build --release --target=wasm32-unknown-unknown --target-dir=target
Finished release [optimized] target(s) in 1.17s
Created dna package file at "C:\\Users\\delroh\\dev\\Aprueba\\hc\\todo-list\\dist\\todo-list.dna.json"
Running tests in test/index.js
> node test/index.js
internal/modules/cjs/loader.js:718
return process.dlopen(module, path.toNamespacedPath(filename));
^
Error: The specified module could not be found.
\\?\C:\Users\delroh\dev\Aprueba\hc\todo-list\test\node_modules\@holochain\holochain-nodejs\bin-package\index.node
at Object.Module._extensions..node (internal/modules/cjs/loader.js:718:18)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (C:\Users\delroh\dev\Aprueba\hc\todo-list\test\node_modules\@holochain\holochain-nodejs\index.js:8:50)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
Error: command node test/index.js was not successful
It happens at const { Config, Scenario } = require("@holochain/holochain-nodejs")
. Is there anything I can check to verify what the problem is that it cannot find the module?
what is your OS, nodejs version, and version of this code that you're running?
Windows 10, 64, using windows-msvc
>node --version
v10.14.2
>hc --version
hc 0.0.6-alpha
Can you try clearing the test/node_modules
folder out, and then running npm install
inside test
directory?
Then rerunning the command you were trying?
Ok I found the issue. I downloaded this project before you updated it to 0.0.6-alpha. I read your commits here and noticed the @holochain/holochain-nodejs
dependency in package.json
had to be updated too, so updated it to 0.4.5-alpha
-> npm install
-> problem solved; tests are running now (failing though). Thank you Connor!
Fantastic. Good debugging
On Thu, Mar 21, 2019 at 11:22 PM delroh notifications@github.com wrote:
Ok I found the issue. I downloaded this project before you updated it to 0.0.6-alpha. I read your commits here and noticed the @holochain/holochain-nodejs dependency in package.json had to be updated too, so updated it to 0.4.5-alpha -> npm install -> problem solved; tests are running now (failing though). Thank you Connor!
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/willemolding/holochain-rust-todo/issues/6#issuecomment-475480835, or mute the thread https://github.com/notifications/unsubscribe-auth/ABWAYSRMpXcqBYFPf0uen_zkVi8W8I47ks5vZExrgaJpZM4Zl8rM .
-- Connor Turland twitter: @Connoropolous http://twitter.com/Connoropolous
There does seem to be an issue with hc 0.0.6-alpha
where running hc test
on the root of the project without doing npm install
manually in the test folder, it returns:
\006\holochain-rust-todo>hc test
[1;32mPackaging[0m files for testing to file: "C:\\Users\\delroh\\dev\\Aprueba\\hc\\006\\holochain-rust-todo\\dist\\holochain-rust-todo.dna.json"
> cargo build --release --target=wasm32-unknown-unknown
Finished release [optimized] target(s) in 0.70s
> cargo build --release --target=wasm32-unknown-unknown
Finished release [optimized] target(s) in 0.67s
Created dna package file at "C:\\Users\\delroh\\dev\\Aprueba\\hc\\006\\holochain-rust-todo\\dist\\holochain-rust-todo.dna.json"
Installing node_modules
> npm install --silent
Error: The system cannot find the file specified. (os error 2)
Will verify after updating to 0.0.7-alpha if the issue keeps happening and post here.
Do you mean that it succeeds if you do run npm install
manually, but failed if you didn't?
Yeah, let me clarify the steps:
Using:
hc 0.0.6-alpha
windows-msvc
hc test
(...)\006\holochain-rust-todo>hc test
�[1;32mPackaging�[0m files for testing to file: "C:\\Users\\delroh\\dev\\Aprueba\\hc\\006\\holochain-rust-todo\\dist\\holochain-rust-todo.dna.json"
> cargo build --release --target=wasm32-unknown-unknown
Finished release [optimized] target(s) in 0.70s
> cargo build --release --target=wasm32-unknown-unknown
Finished release [optimized] target(s) in 0.67s
Created dna package file at "C:\\Users\\delroh\\dev\\Aprueba\\hc\\006\\holochain-rust-todo\\dist\\holochain-rust-todo.dna.json"
Installing node_modules
> npm install --silent
Error: The system cannot find the file specified. (os error 2)
Solution:
cd test
npm install
cd ..
back to root of projecthc test
thanks delroh. the fix you outline (cd'ing into the test folder and running npm install) worked for me.
Standardized on yarn as node package manager where hc package and hc test assumes npm as the package manager. So prior to running "hc test" - steps taken for work around:
No errors in steps above, then from root directory running "hc test" takes me all the way to "Running test in test/index/js" successfully. But I get the following error:
D:\Devtools\Holochain\hc test
?[1;32mPackaging?[0m files for testing to file: ".\\dist\\bundle.json"
> ?[32mcargo?[0m ?[36mbuild --release --target=wasm32-unknown-unknown?[0m
Finished release [optimized] target(s) in 0.73s
> cargo build --release --target=wasm32-unknown-unknown
Finished release [optimized] target(s) in 0.68s
Created bundle file at ".\\dist\\bundle.json"
Running tests in test/index.js
> node test/index.js
internal/modules/cjs/loader.js:718
return process.dlopen(module, path.toNamespacedPath(filename));
^
Error: The specified module could not be found.
\\?\D:\share\BitBucket\ddw-foo\holoapps\holochain-rust-todo\test\node_modules\@holochain\holochain-nodejs\bin-package\index.node
at Object.Module._extensions..node (internal/modules/cjs/loader.js:718:18)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (D:\share\BitBucket\ddw-foo\holoapps\holochain-rust-todo\test\node_modules\@holochain\holochain-nodejs\index.js:9:22)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
Error: command node test/index.js was not successful