LINCnil / pia

Version web front office de l’application PIA à déployer sur un serveur afin d’en donner l’accès via un navigateur web | Front office of the PIA application to be deployed on a server in order to access it through a web browser.
GNU General Public License v3.0
263 stars 271 forks source link

Problems during Frondend installation #287

Closed tsbiznes closed 5 years ago

tsbiznes commented 6 years ago

Hi, We've successfully istaled backend but Frontend brings below mentioned communication: root@spia01:/opt/pia# ng build The build command requires to be run in an Angular project, but a project definition could not be found. root@spia01:/opt/pia# ng test The test command requires to be run in an Angular project, but a project definition could not be found. root@spia01:/opt/pia# ng serve The serve command requires to be run in an Angular project, but a project definition could not be found. root@spia01:/opt/pia# ng build --prod The build command requires to be run in an Angular project, but a project definition could not be found. root@spia01:/opt/pia#

Could you please verify it and give us a hint?

brunto commented 6 years ago

Hi, Could you list me the content of the folder /opt/pia?

amizera commented 6 years ago

drwxr-xr-x 9 root root 4096 lis 6 10:04 ../ -rw-r--r-- 1 root root 1725 paź 30 12:05 .angular-cli.json drwxr-xr-x 2 root root 4096 paź 30 12:05 e2e/ -rw-r--r-- 1 root root 245 paź 30 12:05 .editorconfig drwxr-xr-x 8 root root 4096 paź 30 12:05 .git/ -rw-r--r-- 1 root root 615 paź 30 12:05 .gitignore -rw-r--r-- 1 root root 924 paź 30 12:05 karma.conf.js -rw-r--r-- 1 root root 35033 paź 30 12:05 LICENSE -rw-r--r-- 1 root root 1748 paź 30 12:05 package.json -rw-r--r-- 1 root root 392443 paź 30 12:05 package-lock.json -rw-r--r-- 1 root root 722 paź 30 12:05 protractor.conf.js -rw-r--r-- 1 root root 2478 paź 30 12:05 README.md drwxr-xr-x 5 root root 4096 paź 30 12:05 src/ -rw-r--r-- 1 root root 385 paź 30 12:05 tsconfig.json -rw-r--r-- 1 root root 2941 paź 30 12:05 tslint.json -rw-r--r-- 1 root root 223308 paź 30 12:05 yarn.lock

root@spia01:/opt/pia-bckp# rails -v Rails 5.2.1

root@spia01:/opt/pia-bckp# ruby -v ruby 2.3.3p222 (2016-11-21) [x86_64-linux-gnu]

tsbiznes commented 5 years ago

Hi, Could you please be so kind and send us possible solutions of mentioned above issue?

brunto commented 5 years ago

Hi, I think you angular version need to be updated. You can take a look at: https://stackoverflow.com/questions/52607924/have-a-new-project-but-when-ng-serve-i-get-error and https://stackoverflow.com/questions/53096996/angular-cli-error-the-serve-command-requires-to-be-run-in-an-angular-project-b

mahespth commented 5 years ago

Hi - I have the same issue on RHEL 7.5 please let me know if there is anything I can add to this.

amizera commented 5 years ago

Angular update ends with errors even on root and even when i mkdir manualy

gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/opt/pia/node_modules/node-sass/.node-gyp' gyp ERR! System Linux 4.13.0-21-generic gyp ERR! command "/usr/bin/node" "/opt/pia/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" gyp ERR! cwd /opt/pia/node_modules/node-sass gyp ERR! node -v v8.11.3 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok Build failed with error code: 1 npm WARN @angular/core@7.1.2 requires a peer of zone.js@~0.8.26 but none is installed. You must install peer dependencies yourself. npm WARN angular2-csv@0.2.9 requires a peer of @angular/common@^6.0.0-rc.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself. npm WARN angular2-csv@0.2.9 requires a peer of @angular/core@^6.0.0-rc.0 || ^6.0.0 but none is installed. You must install peer dependencies yourself. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-sass@4.10.0 (node_modules/node-sass): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-sass@4.10.0 postinstall: node scripts/build.js npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

migrate angular ends with same errors ng update @angular/cli --migrate-only --from=1.7.4

kosmas58 commented 5 years ago

@amizera

mahespth commented 5 years ago

@amizera

  • You can't update PIA to Angular 7 in such a simple way. PIA is written in Angular 4.
  • An update to Angular 7 needs some rework onto the codebase.
  • My development versison of PIA uses Angular 7.

Thanks - this helped - I now have a running system on RHEL 7.5 Nodejs6 angular/cli: 1.4.10

abhinav0334 commented 5 years ago

I am running ng build -prod in angular project but still i am getting

The build command requires to be run in an Angular project, but a project definition could not be found.

brunto commented 5 years ago

The angular 7 version is coming soon. Hope it'll be fix your issue.

ccorbalan commented 5 years ago

I'm having the same error when installing pia-frontend in ubuntu ng build --prod --build-optimizer --sourcemaps "The build command requires to be run in an Angular project, but a project definition could not be found." Is there any solution for this?

Thank you very much.

ngigiGodfrey commented 5 years ago

I am facing the same issue when running the ng build --prod command. kindly assist

ibrahimkais commented 5 years ago

Hi guys Same problem here is there a way to read the npm log ? /root/.npm/_logs/2019-01-28T09_03_11_670Z-debug.log

The build command requires to be run in an Angular project, but a project definition could not be found. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! car-app@0.0.0 ng: ng "build" "--prod" npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the car-app@0.0.0 ng script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2019-01-28T09_03_11_670Z-debug.log

rubendias commented 5 years ago

Hi guys, same problem here. Are there any news regarding this issue?

taoufikrais commented 5 years ago

Hello,

I'm having the same error when installing pia-frontend in ubuntu ng build --prod --build-optimizer --sourcemaps "The build command requires to be run in an Angular project, but a project definition could not be found." Is there any solution for this?

Thank you very much.

francescob commented 5 years ago

I've solved the problem by doing

npm install -g @angular/cli@1.5

and then

npm install

taoufikrais commented 5 years ago

thank you francisco, the problem is solved

taoufikrais commented 5 years ago

hi francisco , i have also this error when try to execute this cmd gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 indicated in the runbook PIA Installation Runbook V1.2.docx gpg: keyserver receive failed: Network is unreachable i 'm try to serach the key directly in the site http://keys.gnupg.net but i don't found

naruto227 commented 5 years ago

there is more detailed method。here:

stcserviciosdiaz commented 5 years ago

ng update @angular/cli --migrate-only --from=1.7.3

brunto commented 5 years ago

The angular7 version is on its way.