angular-input-masks icon indicating copy to clipboard operation
angular-input-masks copied to clipboard

"npm install" on windows error

Open rafaelzomer opened this issue 10 years ago • 12 comments

I'm trying to 'npm install' this projects on windows, but i am getting this error: Thank you in advance.

> [email protected] prepublish C:\projects\angular-input-masks                                                             
> gulp build                                                                                                                       

[11:26:50] Using gulpfile C:\projects\angular-input-masks\gulpfile.js                                                              
[11:26:50] Starting 'build-dependencies'...                                                                                        
[11:26:51] Finished 'build-dependencies' after 1.09 s                                                                              
[11:26:51] Starting 'build'...                                                                                                     

events.js:72                                                                                                                       
        throw er; // Unhandled 'error' event                                                                                       
              ^                                                                                                                    
Error: Cannot find module 'validators' from './src/'                                                                               
    at C:\projects\angular-input-masks\node_modules\browserify\node_modules\resolve\lib\async.js:46:17                             
    at process (C:\projects\angular-input-masks\node_modules\browserify\node_modules\resolve\lib\async.js:173:43)                  
    at ondir (C:\projects\angular-input-masks\node_modules\browserify\node_modules\resolve\lib\async.js:188:17)                    
    at load (C:\projects\angular-input-masks\node_modules\browserify\node_modules\resolve\lib\async.js:69:43)                      
    at onex (C:\projects\angular-input-masks\node_modules\browserify\node_modules\resolve\lib\async.js:92:31)                      
    at C:\projects\angular-input-masks\node_modules\browserify\node_modules\resolve\lib\async.js:22:47                             
    at Object.oncomplete (fs.js:107:15)                                                                                            

npm ERR! [email protected] prepublish: `gulp build`                                                                        
npm ERR! Exit status 8                                                                                                             
npm ERR!                                                                                                                           
npm ERR! Failed at the [email protected] prepublish script.                                                                
npm ERR! This is most likely a problem with the angular-input-masks package,                                                       
npm ERR! not with npm itself.                                                                                                      
npm ERR! Tell the author that this fails on your system:                                                                           
npm ERR!     gulp build                                                                                                            
npm ERR! You can get their info via:                                                                                               
npm ERR!     npm owner ls angular-input-masks                                                                                      
npm ERR! There is likely additional logging output above.                                                                          
npm ERR! System Windows_NT 6.1.7601                                                                                                
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" 
npm ERR! cwd C:\projects\angular-input-masks                                                                                       
npm ERR! node -v v0.10.28                                                                                                          
npm ERR! npm -v 1.4.9                                                                                                              
npm ERR! code ELIFECYCLE                                                                                                           
npm ERR!                                                                                                                           
npm ERR! Additional logging details can be found in:                                                                               
npm ERR!     C:\projects\angular-input-masks\npm-debug.log                                                                         
npm ERR! not ok code 0                                                                                                             

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/26758781-npm-install-on-windows-error?utm_campaign=plugin&utm_content=tracker%2F1022469&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1022469&utm_medium=issues&utm_source=github).

rafaelzomer avatar Sep 17 '15 14:09 rafaelzomer

Same freaking issue. Hate these absurdly fragmented projects with no prebuilt release versions. Wasting my f'ing time trying to learn all your toolchain so I can just use a freaking us phone number mask.

circuitrider avatar Sep 17 '15 17:09 circuitrider

I don't get what you need, you just intend to use the project? If yes, the project have a prebuilt release, you can get it by these methods 'https://github.com/assisrafael/angular-input-masks#installation' or on this link: https://github.com/assisrafael/bower-angular-input-masks. I'm with this issue because i'm trying to do a PR

rafaelzomer avatar Sep 17 '15 17:09 rafaelzomer

@rafaelzomer which versions of node, npm and windows you are using?

assisrafael avatar Sep 17 '15 17:09 assisrafael

I'm not using Bower in my toolchain and furthermore that lacks all the US masks in the resulting build output. The "angular-input-masks.us.js" is full of this module.exports and require('... crap that I wasted my time trying to custom build.

circuitrider avatar Sep 17 '15 17:09 circuitrider

@assisrafael

node = v0.10.28 npm = 1.4.9 windows = Windows 7 Ultimate / Service Pack 1

rafaelzomer avatar Sep 17 '15 17:09 rafaelzomer

You just cloned the repository and executed npm install?

assisrafael avatar Sep 17 '15 18:09 assisrafael

@assisrafael Yes

rafaelzomer avatar Sep 17 '15 19:09 rafaelzomer

Which version of browserify is installed?

assisrafael avatar Sep 17 '15 19:09 assisrafael

v10.2.1 but i ran "npm install -g [email protected]", before do "browserify --version"

rafaelzomer avatar Sep 17 '15 19:09 rafaelzomer

Try npm install browserify@latest inside angular-input-masks folder for a fresh local installation.

assisrafael avatar Sep 17 '15 20:09 assisrafael

I ran it, but when i ran "npm install" again the NPM fetched the version of browserify that was in package.json, so, i tried to ran only "gulp build", but the system give me the following error:

'gulp' não é reconhecido como um comando interno
ou externo, um programa operável ou um arquivo em lotes.

Aparently windows can't run local modules that are inside of "node_modules" (Maybe?)(It should work? I don't remeber if this works on this way on Linux)

rafaelzomer avatar Sep 17 '15 20:09 rafaelzomer

Maybe is your node version. Try a newer version, like v4.0. The build process works fine in windows using [email protected]. On linux it works well with >=0.10.40

assisrafael avatar Sep 17 '15 20:09 assisrafael