Boulangerie / angular-translate-extract

Manage extraction of angular-translate in your angular projects
MIT License
7 stars 5 forks source link

Npm install does not build the package on Windows #10

Open sibbl opened 8 years ago

sibbl commented 8 years ago

I just installed the module via npm install -D angular-translate-extract but when importing it, Node always tells me that it Cannot find module 'angular-translate-extract'.

As far as I can see, the "main": "./lib/index.js", inside the package.json refers to a lib folder, which does not exist in my local node_modules/angular-translate-extract directory.

I'm using the latest node and npm versions on Windows. Is it possible that the rm of the prebuild steps might be the reason as it's not available on Windows?

Update: removing the prebuild step and compiling it myself with npm run build in the directory helped. I guess you should rather use rimraf or some other useful package for this.

vjanssens commented 8 years ago

This is indeed a problem, also on a mac. I did the following to fix this quickly:

  1. $ cd node_modules/angular-translate-extract
  2. $ npm install
  3. $ npm run build Ofcourse this is far from ideal, but it worked for me.

I have to say, if you set up everything correctly it absolutely works like a charm. The extra info (empty/updated/deleted/new) are really usefull. Reason for me for changing from gulp-angular-translate-extract to this module is it's ability to extract strings in ternary operators. Great work!