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

npm install fails due to Python27 version missing #17

Closed
kelvenus opened this issue Jun 19, 2018 · 7 comments
Closed

npm install fails due to Python27 version missing #17

kelvenus opened this issue Jun 19, 2018 · 7 comments

Comments

@kelvenus
Copy link

Hi
I am having issues runing npm install for this project.

It seems to require python27 and I cannot get python 27 to install on Windows 10.
So, is there a way to force the application to use python 3.6?
I have tried different versions of Python 2.** but get the same error on windows 10, Python 3.** installs fine but the application cannot find python.exe even though I have it in both user and system env.
Python 2.7.15 setup error log
An error occured during the installatin of assembly 'policy.9.0.Microsoft.
Microsoft.VC90.CRT, version="9.9.30729.1", publicKeyToken="1 fc82
***, processor Architecture="Amd64", type ="Win32-policy""
Please refer to help and support for more information.

This is the error log from npm install
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "C:\Program Files\Anaconda3\python.exe" in the PATH
gyp verb which succeeded C:\Program Files\Anaconda3\python.exe C:\Program Files\Anaconda3\python.exe
gyp verb check python version C:\Program Files\Anaconda3\python.exe -c "import platform; print(platform.python_version());" returned: "3.5.2\r\n"
gyp verb could not find "C:\Program Files\Anaconda3\python.exe". checking python launcher
gyp verb could not find "C:\Program Files\Anaconda3\python.exe". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "C:\Program Files\Anaconda3\python.exe", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (C:\code\pwa-ecommerce-demo\project\node_modules\node-gyp\lib\configure.js:492:19)
gyp ERR! stack at PythonFinder. (C:\code\pwa-ecommerce-demo\project\node_modules\node-gyp\lib\configure.js:517:16)
gyp ERR! stack at C:\code\pwa-ecommerce-demo\project\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:170:21)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\code\pwa-ecommerce-demo\project\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\code\pwa-ecommerce-demo\project\node_modules\node-sass
gyp ERR! node -v v9.9.0
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall 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\Steven\AppData\Roaming\npm-cache_logs\2018-06-19T14_23_48_439Z-debug.log

@DavidScales
Copy link
Contributor

I think a similar issue is reported here in #9, and I don't think there is a way to force a certain version of python, as one of the dependencies simply depends on version 2.7

@nasearle I thought we removed some of the dependencies at some point when updating ILT content to v2? Do you remember if we managed to fix this & the status on merging the fixes?

@kelvenus you may consider trying the v2-ecommerce-app branch, where we've made some updates but haven't merged yet?

@nasearle
Copy link
Contributor

@DavidScales is correct, we removed the Python 2.7 dependency in v2-ecommerce-app branch. Give that a try. We should be merging this branch and updating the instructions in the near future.

@kelvenus
Copy link
Author

Thanks @DavidScales and @nasearle for your prompt response. I will find and clone v2-ecommerce-app and let you know if it works.

@kelvenus
Copy link
Author

kelvenus commented Jun 19, 2018

@DavidScales, a CLA confirmation is required for v2. Will there be an issue if I clone?

@kelvenus
Copy link
Author

Thanks @DavidScales and @nasearle
npm install works fine for v2-e-commerce-app. I downloaded it as zip, extracted, and ran npm install and it works.
I will follow the rest of the instructions and let you know what I find.
***Results of npm install v2-ecommerce-app on Windows 10 (FYI)

[email protected] install C:\code\pwa-ecommerce_app2\project\node_modules\uws
node-gyp rebuild > build_log.txt 2>&1 || exit 0

[email protected] postinstall C:\code\pwa-ecommerce_app2\project\node_modules\nodemon
node -e "console.log('\u001b[32mLove nodemon? You can now support the project via the open collective:\u001b[22m\u001b[39m\n > \u001b[96m\u001b[1mhttps://opencollective.com/nodemon/donate\u001b[0m\n')" || exit 0

Love nodemon? You can now support the project via the open collective:

https://opencollective.com/nodemon/donate

[email protected] postinstall C:\code\pwa-ecommerce_app2\project\node_modules\gifsicle
node lib/install.js

√ gifsicle pre-build test passed successfully

[email protected] postinstall C:\code\pwa-ecommerce_app2\project\node_modules\jpegtran-bin
node lib/install.js

√ jpegtran pre-build test passed successfully

[email protected] postinstall C:\code\pwa-ecommerce_app2\project\node_modules\optipng-bin
node lib/install.js

√ optipng pre-build test passed successfully
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 1596 packages from 1424 contributors and audited 20729 packages in 203.749s
found 174 vulnerabilities (65 low, 83 moderate, 24 high, 2 critical)
run npm audit fix to fix them, or npm audit for details

@nasearle
Copy link
Contributor

@kelvenus There may be some inconsistencies between the current instructions and that new branch. We will publish a new set of instructions when we merge the new branch in the near future. You're welcome work through it with the current instructions and try and make it work! :)

@kelvenus
Copy link
Author

Hi @nasearle, Thanks I notice that, but got it working now. I will like to try building something similar on my own. Thanks to you both, your suggestions were helpful.

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

3 participants