Skip to content

Conversation

@asottile
Copy link
Contributor

@asottile asottile commented Jan 3, 2019

I need to double check this on windows (I patched out is_WIN and hacked around on posix) but it should work.

I also fixed the flake8 error since they'll be syntax errors in python3.8

@asottile
Copy link
Contributor Author

asottile commented Jan 3, 2019

windows cmd.exe

C:\Users\IEUser\AppData\Local\Temp\t\nodeenv>python nodeenv.py nenv
 * Install prebuilt node (11.6.0) ..... done.
You do not have sufficient privilege to perform this operation.
You do not have sufficient privilege to perform this operation.
Error: Failed to create nodejs.exe link

C:\Users\IEUser\AppData\Local\Temp\t\nodeenv>echo %errorlevel%
0

C:\Users\IEUser\AppData\Local\Temp\t\nodeenv>nenv\Scripts\activate.bat

(nenv) C:\Users\IEUser\AppData\Local\Temp\t\nodeenv>npm install left-pad
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\IEUser\AppD
ata\Local\Temp\t\nodeenv\package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.

npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\IEUser\AppData
\Local\Temp\t\nodeenv\package.json'
npm WARN nodeenv No description
npm WARN nodeenv No repository field.
npm WARN nodeenv No README data
npm WARN nodeenv No license field.

+ left-pad@1.3.0
added 1 package from 1 contributor and audited 1 package in 2.127s
found 0 vulnerabilities


(nenv) C:\Users\IEUser\AppData\Local\Temp\t\nodeenv>ls node_modules
left-pad

(nenv) C:\Users\IEUser\AppData\Local\Temp\t\nodeenv>rm -rf node_modules

(nenv) C:\Users\IEUser\AppData\Local\Temp\t\nodeenv>npm install left-pad -g
+ left-pad@1.3.0
added 1 package from 1 contributor in 0.318s

(nenv) C:\Users\IEUser\AppData\Local\Temp\t\nodeenv>ls nenv\Scripts\node_modules

left-pad  npm

cygwin

found a bug, npm isn't chmod +x, I'll need to fix that

@asottile
Copy link
Contributor Author

asottile commented Jan 3, 2019

and here's cygwin working:

IEUser@IE11WIN7 /tmp/nodeenv
$ python nodeenv.py nenv
 * Install prebuilt node (11.6.0) ..... done.

IEUser@IE11WIN7 /tmp/nodeenv
$ . nenv/bin/activate
(nenv)
IEUser@IE11WIN7 /tmp/nodeenv
$ npm install left-pad
npm WARN saveError ENOENT: no such file or directory, open 'C:\cygwin\tmp\nodeenv\package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open 'C:\cygwin\tmp\nodeenv\package.json'
npm WARN nodeenv No description
npm WARN nodeenv No repository field.
npm WARN nodeenv No README data
npm WARN nodeenv No license field.

+ left-pad@1.3.0
added 1 package from 1 contributor and audited 1 package in 0.696s
found 0 vulnerabilities

(nenv)
IEUser@IE11WIN7 /tmp/nodeenv
$ ls node_modules/
left-pad
(nenv)
IEUser@IE11WIN7 /tmp/nodeenv
$ npm install -g left-pad
+ left-pad@1.3.0
added 1 package from 1 contributor in 0.271s
(nenv)
IEUser@IE11WIN7 /tmp/nodeenv
$ ls nenv/bin/node_modules/
left-pad  npm

@ekalinin
Copy link
Owner

Cool! Thank you!

@ekalinin ekalinin merged commit db0aa3a into ekalinin:master Jan 11, 2019
@asottile asottile deleted the prebuilt_node_npm_zip branch January 11, 2019 14:40
@asottile
Copy link
Contributor Author

🎉 looking forward to the next release!

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

Successfully merging this pull request may close these issues.

2 participants