martinroob / tiny-translator

A tiny little webapp to quick and dirty translate XLIFF and xmb files
MIT License
57 stars 9 forks source link

npm install and npm run start-en errors #6

Closed skormel closed 7 years ago

skormel commented 7 years ago

Hello,

First of all, thank you very much for ngx-i18nsupport it's a great tool.

I'm trying to install this project (tiny-translator) on my own server but i've got several errors.

My global version software are: Nodejs: 7.10.0 @angular/cli: 1.0.3 typescript: 2.3.2

Here my proccess:

When I lauch npm install I've got this result:

 $ npm install                                                                                                     [14:27:12]
npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/home/adelgado/.nvm/versions/node/v7.10.0/bin/node" "/home/adelgado/.nvm/versions/node/v7.10.0/bin/npm" "install"
npm ERR! node v7.10.0
npm ERR! npm  v4.2.0
npm ERR! code ETARGET

npm ERR! notarget No compatible version found: @angular/flex-layout@2.0.0-beta-7
npm ERR! notarget Valid install targets:
npm ERR! notarget 2.0.0-beta.0, 2.0.0-beta.1, 2.0.0-beta.3, 2.0.0-beta.4, 2.0.0-beta.5, 2.0.0-rc.1, 2.0.0-beta.7, 2.0.0-beta.8
npm ERR! notarget
npm ERR! notarget This is most likely not a problem with npm itself.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'tiny-translator'
npm ERR! notarget

npm ERR! Please include the following file with any support request:
npm ERR!     /home/adelgado/.npm/_logs/2017-05-11T12_27_21_328Z-debug.log

I solved this error by changing flex-layout@2.0.0-beta-7 to flex-layout@2.0.0-beta.8 and now npm install can finish but an error it's thrown:

│   ├── lazy-req@2.0.0
│   ├── semver-diff@2.1.0
│   └── xdg-basedir@3.0.0
├── typescript@2.3.2
└── UNMET PEER DEPENDENCY zone.js@0.7.8

And Finally when I start the server with npm run start-en I've got these errors:

 npm run start-en                                                                                            [14:34:20]

> tiny-translator@0.0.1 start-en /home/adelgado/dev/tiny-translator
> ng serve --aot --i18n-file=src/i18n/messages.en.xlf --locale=en --i18n-format=xlf

** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200 **
Hash: 9fbc49b46e1daba5cc0a
Time: 4912ms
chunk    {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 158 kB {4} [initial] [rendered]
chunk    {1} styles.bundle.js, styles.bundle.js.map (styles) 8.47 kB {4} [initial] [rendered]
chunk    {2} main.bundle.js, main.bundle.js.map (main) 1.1 kB {3} [initial] [rendered]
chunk    {3} vendor.bundle.js, vendor.bundle.js.map (vendor) 1.11 MB [initial] [rendered]
chunk    {4} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]

ERROR in ./~/css-loader?{"sourceMap":false,"importLoaders":1}!./~/postcss-loader?{"ident":"postcss"}!./~/sass-loader/lib/loader.js?{"sourceMap":false,"precision":8,"includePaths":[]}!./src/styles.scss
Module build failed:
@import '~@angular/material/core/theming/all-theme';
^
      File to import not found or unreadable: ~@angular/material/core/theming/all-theme.
Parent style sheet: stdin
      in /home/adelgado/dev/tiny-translator/src/styles.scss (line 7, column 1)
 @ ./src/styles.scss 4:14-189
 @ multi ./src/styles.scss

ERROR in Child compilation failed:
Module build failed:
@import '~@angular/material/core/theming/theming';
^
      File to import not found or unreadable: ~@angular/material/core/theming/theming.
Parent style sheet: stdin
      in /home/adelgado/dev/tiny-translator/src/app/app.component.scss (line 1, column 1):
Error:
@import '~@angular/material/core/theming/theming';
^
      File to import not found or unreadable: ~@angular/material/core/theming/theming.
Parent style sheet: stdin
      in /home/adelgado/dev/tiny-translator/src/app/app.component.scss (line 1, column 1)

ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in '/home/adelgado/dev/tiny-translator/src'
 @ ./src/main.ts 4:0-74
 @ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts
webpack: Failed to compile.

How can I solve these error? Can you push a fix to solve theses errors.

Best Regards Antonio

martinroob commented 7 years ago

First, thank you for your interest on the project.

Sorry about the problems. I think it happens because there is a new incompatible version of material out after my last commit. I did not fix the dependencies. You can use yarn to avoid that. yarn install should install exactly the same npm versions of everything I had when I build it.

Hope that help. I will write out a new version with Angular 4.1 and material beta 3 during this week (hopefully, if I find the time)

skormel commented 7 years ago

I'll try it tomorrow at work.

Thanks for all.

Best Regards Antonio