sinonjs / sinon

Test spies, stubs and mocks for JavaScript.
https://sinonjs.org/
Other
9.63k stars 769 forks source link

Installation problems on Windows paltform #1104

Closed hellboy81 closed 8 years ago

hellboy81 commented 8 years ago

We understand you have a problem and are in a hurry, but please provide us with some info to make it much more likely for your issue to be understood, worked on and resolved quickly.

  • Sinon version : please verify that the bug exists in the latest Sinon release
  • Environment : Windows_NT 6.1.7601
  • Node.js: Current version: v6.3.0 (includes npm 3.10.3)
  • Other libraries you are using: mocha, proxyquire last versions

What did you expect to happen?

sinon.js should be installed also un der Windows platform

What actually happens

npm i sinon --save-dev blabla@1.0.0 C:\DATA\Projects\blabla +-- lolex@1.3.2 extraneous `-- 
util@0.10.3 extraneous npm WARN blabla@1.0.0 No repository field. npm ERR! Windows_NT 6.1.7601 
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\ npm ERR! node 
v6.3.0 npm ERR! npm v3.10.3 npm ERR! path C:\DATA\Projects\blabla\node_modules\.staging\formatio-
f071a06 npm ERR! code EPERM npm ERR! errno -4048 npm ERR! syscall rename npm ERR! Error: 
EPERM: operation not permitted, rename 'C:\DATA\... npm ERR! at destStatted (C:\Program Files\nodejs
\node_modules\npm\lib\instal npm ERR! at FSReqWrap.oncomplete (fs.js:123:15) npm ERR! npm ERR! 
Error: EPERM: operation not permitted, rename 'C:\DATA\Projects\... npm ERR! at Error (native) npm 
ERR! { Error: EPERM: operation not permitted, rename 'C:\DATA\Projects\... npm ERR! at destStatted 
(C:\Program Files\nodejs\node_modules\npm\lib\instal npm ERR! at FSReqWrap.oncomplete 
(fs.js:123:15) npm ERR! npm ERR! Error: EPERM: operation not permitted, rename 'C:\DATA\Projects
\update_ npm ERR! at Error (native) parent: 'update_cms' } npm ERR! npm ERR! Please try running this 
command again as root/Administrator.

The same problem under `root/Administrator

How to reproduce

npm install sinon [-save-dev]

fatso83 commented 8 years ago

I think this is a problem on your machine. Try creating a folder in another directory. Go into that and try npm install sinon there.

Does that work?

fatso83 commented 8 years ago

Finally got to test this out on some windows box. Works fine using both stable and development releases of Node on a normal Windows 10 install (using a Cygwin shell, but npm is running in a CMD shell, alias npm=cmd /c npm`, so it is of no importance). Still holds the view that this is an issue on your machine. Probably some file being held by a zombie process or something. Never got a response, so hard to tell.

Working using NPM 3.10.3 and Node x64 v6.3.1 ``` $ npm install sinon@1.17.4 test-sinon@1.0.0 C:\cygwin64\home\Carl-Erik\test-sinon `-- sinon@1.17.4 +-- formatio@1.1.1 +-- lolex@1.3.2 +-- samsam@1.1.2 `-- util@0.10.3 `-- inherits@2.0.1 npm WARN test-sinon@1.0.0 No description npm WARN test-sinon@1.0.0 No repository field. Carl-Erik at Arbeidshesten in ~/test-sinon $ npm --version 3.10.3 Carl-Erik at Arbeidshesten in ~/test-sinon $ node --version v6.3.1 ```
Working using NPM 2.14.7 and Node x64 v4.2.3 ``` $ npm install sinon@1.17.4 npm WARN package.json test-sinon@1.0.0 No description npm WARN package.json test-sinon@1.0.0 No repository field. npm WARN package.json test-sinon@1.0.0 No README data sinon@1.17.4 node_modules\sinon ├── formatio@1.1.1 ├── samsam@1.1.2 ├── lolex@1.3.2 └── util@0.10.3 (inherits@2.0.1) Carl-Erik at Arbeidshesten in ~/test-sinon $ node --version v4.2.3 Carl-Erik at Arbeidshesten in ~/test-sinon $ npm --version 2.14.7 ```