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

Unable to pull NPM dependencies while installing empirica on Windows #8

Closed
wrahool opened this issue Jun 20, 2019 · 2 comments
Closed

Comments

@wrahool
Copy link

wrahool commented Jun 20, 2019

All the dependencies (latest Node.js, chocolatey, metoer) are installed. Yet I get this error:

C:\...\empirica>npx create-empirica-app my-experiment

Creating a new Empirica app in C:\...\empirica\my-experiment.

Setting up App template.

Pulling NPM dependencies.


> [email protected] install C:\...\empirica\my-experiment\node_modules\bcrypt
> 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(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.3/bcrypt_lib-v3.0.3-node-v57-win32-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v57 ABI, unknown) (falling back to source compile with node-gyp)
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\...\empirica\my-experiment\node_modules\bcrypt\build\bcrypt_lib.vcxproj(20,3): error MSB40
19: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declarat
ion is correct, and that the file exists on disk.
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\..\AppData\Local\.meteor\packages\meteor-tool\1.8.1\mt-os.windows.x86_64\dev_bundle\lib\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\..\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.8.1\\mt-os.windows.x86_64\\dev_bundle\\bin\\node.exe" "C:\\..\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.8.1\\mt-os.windows.x86_64\\dev_bundle\\lib\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--module=C:\\.....\\empirica\\my-experiment\\node_modules\\bcrypt\\lib\\binding\\bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=C:\\...\\empirica\\my-experiment\\node_modules\\bcrypt\\lib\\binding" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd C:\....\empirica\my-experiment\node_modules\bcrypt
gyp ERR! node -v v8.15.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\..\AppData\Local\.meteor\packages\meteor-tool\1.8.1\mt-os.windows.x86_64\dev_bundle\bin\node.exe C:\..\AppData\Local\.meteor\packages\meteor-tool\1.8.1\mt-os.windows.x86_64\dev_bundle\lib\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\..\Documents\Work\empirica\my-experiment\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:..\Documents\Work\empirica\my-experiment\node_modules\bcrypt\lib\binding --napi_version=3 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\..\AppData\Local\.meteor\packages\meteor-tool\1.8.1\mt-os.windows.x86_64\dev_bundle\lib\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:915:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Windows_NT 10.0.17134
node-pre-gyp ERR! command "C:\\..\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.8.1\\mt-os.windows.x86_64\\dev_bundle\\bin\\node.exe" "C:\\..\\AppData\\Local\\.meteor\\packages\\meteor-tool\\1.8.1\\mt-os.windows.x86_64\\dev_bundle\\lib\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\......\empirica\my-experiment\node_modules\bcrypt
node-pre-gyp ERR! node -v v8.15.1
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
node-pre-gyp ERR! not ok
Failed to execute 'C:\...\AppData\Local\.meteor\packages\meteor-tool\1.8.1\mt-os.windows.x86_64\dev_bundle\bin\node.exe C:\...\AppData\Local\.meteor\packages\meteor-tool\1.8.1\mt-os.windows.x86_64\dev_bundle\lib\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --module=C:\....\empirica\my-experiment\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\......\empirica\my-experiment\node_modules\bcrypt\lib\binding --napi_version=3 --node_abi_napi=napi' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install 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:\..\AppData\Roaming\npm-cache\_logs\2019-06-20T02_33_28_003Z-debug.log


Could not pull NPM dependencies
@wrahool wrahool changed the title Unable to pull NPM dependencies while installing empirica on Windows Unable to pull NPM dependencies while installing empirica on Windows Jun 20, 2019
@wrahool
Copy link
Author

wrahool commented Jun 20, 2019

As it was clear that the issue was with the installation of bcrypt, I tried to install that first. That required me to first install windows-build-tools, following directions here by running

npm install --global --production windows-build-tools

That then ran into an error. Found out here, that there's some problem with the latest version of the windows-build-tool. So, the workaround was installing the version 4.0.0 instead, which was

npm install --global --production [email protected]

and then running

npm install -g --production windows-build-tools

This does seem to have resolved the original issue. I don't get all those error messages, and I see a Happy experimenting! prompt when I create a new experiment (npx create-empirica-app my-experiment).

However, one caveat is that windows-build-tools has installed python2.7 over python3.6 on my windows machine.

@wrahool wrahool closed this as completed Jun 20, 2019
@npaton
Copy link
Contributor

npaton commented Jun 21, 2019

@wrahool Thank you very much for taking the time to share your solution here, this is will come in handy for people encountering this same issue. I will try to see if there is a way for us to avoid this problem in the first place, but from the description it does look like a dependency issue that might be out of our reach for now. In any case, many thanks!

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

No branches or pull requests

2 participants