Partage
  • Partager sur Facebook
  • Partager sur Twitter

Installation Environnement Fullstack sur Mac

NPM Err

    22 septembre 2021 à 19:36:05

    Bonsoir 

    J'ai essayé plusieurs fois d'installer et configurer mon mac book pro 11.5.2 pour le cours de will sur fullstack mais j'ai tjs des erreurs malgre les liens fournis 

    comment avez vous fait pour installer vos outils svp ? 

    merci 

    michaelaidan@MacBook-Michael frontend % npm install
    npm ERR! code ENOENT
    npm ERR! syscall open
    npm ERR! path /Users/michaelaidan/Documents/Dev/Etude/OC-Formation/Fullstack/frontend/package.json
    npm ERR! errno -2
    npm ERR! enoent ENOENT: no such file or directory, open '/Users/michaelaidan/Documents/Dev/Etude/OC-Formation/Fullstack/frontend/package.json'
    npm ERR! enoent This is related to npm not being able to find a file.
    npm ERR! enoent 
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /Users/michaelaidan/.npm/_logs/2021-09-22T17_04_44_506Z-debug.log
    michaelaidan@MacBook-Michael frontend % cd
    michaelaidan@MacBook-Michael ~ % sudo npm install -g @angular/cli
    Password:
    npm WARN deprecated har-validator@5.1.5: this library is no longer supported
    npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
    npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
    
    added 239 packages, and audited 240 packages in 14s
    
    23 packages are looking for funding
      run `npm fund` for details
    
    found 0 vulnerabilities
    michaelaidan@MacBook-Michael ~ % sudo npm uninstall -g @angular/cli
    
    removed 239 packages, and audited 1 package in 2s
    
    found 0 vulnerabilities
    michaelaidan@MacBook-Michael ~ % brew install angular/cli
    Updating Homebrew...
    ==> Auto-updated Homebrew!
    Updated 3 taps (homebrew/core, homebrew/cask and homebrew/services).
    ==> New Formulae
    actionlint          clickhouse-cpp      jpdfbookmarks       lziprecover         viddy
    apache-pulsar       gomodifytags        libavif             pkg-config-wrapper  viu
    bat-extras          gotests             librist             pkgconf
    bottom              gtop                lunzip              red-tldr
    ==> Updated Formulae
    Updated 673 formulae.
    ==> Deleted Formulae
    ocamlsdl                                           vavrdiasm
    ==> New Casks
    almighty                          gcs                               remix-ide
    dockview                          nimblenote                        remotion
    epilogue-operator                 notunes                           universal-gcode-platform
    ==> Updated Casks
    Updated 288 casks.
    
    Warning: No available formula or cask with the name "angular/cli". Did you mean angular-cli?
    ==> Searching for similarly named formulae...
    This similarly named formula was found:
    angular-cli
    To install it, run:
      brew install angular-cli
    ==> Searching for a previously deleted formula (in the last month)...
    Error: No previously deleted formula found.
    michaelaidan@MacBook-Michael ~ % brew install angular-cli
    ==> Downloading https://ghcr.io/v2/homebrew/core/nghttp2/manifests/1.45.1
    ######################################################################## 100.0%
    ==> Downloading https://ghcr.io/v2/homebrew/core/nghttp2/blobs/sha256:9259742cf609ff32e077e3eaa081e36
    ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:9259742cf609ff32
    ######################################################################## 100.0%
    ==> Downloading https://ghcr.io/v2/homebrew/core/node/manifests/16.9.1
    ######################################################################## 100.0%
    ==> Downloading https://ghcr.io/v2/homebrew/core/node/blobs/sha256:41336818ebd9fc549ccb3e7a0b4786056d
    ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:41336818ebd9fc54
    ######################################################################## 100.0%
    ==> Downloading https://ghcr.io/v2/homebrew/core/angular-cli/manifests/12.2.6
    ######################################################################## 100.0%
    ==> Downloading https://ghcr.io/v2/homebrew/core/angular-cli/blobs/sha256:aa83aae04a616c2ae7381e49399
    ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:aa83aae04a616c2a
    ######################################################################## 100.0%
    ==> Installing dependencies for angular-cli: nghttp2 and node
    ==> Installing angular-cli dependency: nghttp2
    ==> Pouring nghttp2--1.45.1.big_sur.bottle.tar.gz
    🍺  /usr/local/Cellar/nghttp2/1.45.1: 23 files, 2.8MB
    ==> Installing angular-cli dependency: node
    ==> Pouring node--16.9.1.big_sur.bottle.tar.gz
    Error: The `brew link` step did not complete successfully
    The formula built, but is not symlinked into /usr/local
    Could not symlink bin/node
    Target /usr/local/bin/node
    already exists. You may want to remove it:
      rm '/usr/local/bin/node'
    
    To force the link and overwrite all conflicting files:
      brew link --overwrite node
    
    To list all files that would be deleted:
      brew link --overwrite --dry-run node
    
    Possible conflicting files are:
    /usr/local/bin/node
    /usr/local/include/node/common.gypi
    /usr/local/include/node/config.gypi
    /usr/local/include/node/cppgc/common.h
    /usr/local/include/node/js_native_api.h
    /usr/local/include/node/js_native_api_types.h
    /usr/local/include/node/libplatform/libplatform-export.h
    /usr/local/include/node/libplatform/libplatform.h
    /usr/local/include/node/libplatform/v8-tracing.h
    /usr/local/include/node/node.h
    /usr/local/include/node/node_api.h
    /usr/local/include/node/node_api_types.h
    /usr/local/include/node/node_buffer.h
    /usr/local/include/node/node_object_wrap.h
    /usr/local/include/node/node_version.h
    /usr/local/include/node/v8-internal.h
    /usr/local/include/node/v8-platform.h
    /usr/local/include/node/v8-profiler.h
    /usr/local/include/node/v8-version.h
    /usr/local/include/node/v8.h
    /usr/local/include/node/v8config.h
    /usr/local/share/doc/node/gdbinit
    /usr/local/share/doc/node/lldb_commands.py
    /usr/local/share/man/man1/node.1
    /usr/local/share/systemtap/tapset/node.stp
    /usr/local/lib/dtrace/node.d
    Warning: The post-install step did not complete successfully
    You can try again using:
      brew postinstall node
    ==> Summary
    🍺  /usr/local/Cellar/node/16.9.1: 2,436 files, 48.4MB
    ==> Installing angular-cli
    ==> Pouring angular-cli--12.2.6.big_sur.bottle.tar.gz
    Error: The `brew link` step did not complete successfully
    The formula built, but is not symlinked into /usr/local
    Could not symlink bin/ng
    Target /usr/local/bin/ng
    already exists. You may want to remove it:
      rm '/usr/local/bin/ng'
    
    To force the link and overwrite all conflicting files:
      brew link --overwrite angular-cli
    
    To list all files that would be deleted:
      brew link --overwrite --dry-run angular-cli
    
    Possible conflicting files are:
    /usr/local/bin/ng -> /usr/local/lib/node_modules/@angular/cli/bin/ng
    ==> Summary
    🍺  /usr/local/Cellar/angular-cli/12.2.6: 10,555 files, 34.3MB
    michaelaidan@MacBook-Michael ~ %  brew postinstall node
    ==> Postinstalling node
    Warning: The post-install step did not complete successfully
    You can try again using:
      brew postinstall node
    michaelaidan@MacBook-Michael ~ % brew postinstall node
    ==> Postinstalling node
    Warning: The post-install step did not complete successfully
    You can try again using:
      brew postinstall node
    michaelaidan@MacBook-Michael ~ % rm '/usr/local/bin/ng'
    michaelaidan@MacBook-Michael ~ % ng --version
    zsh: command not found: ng
    michaelaidan@MacBook-Michael ~ % angular --version
    zsh: command not found: angular
    michaelaidan@MacBook-Michael ~ % npm --version
    7.21.1
    michaelaidan@MacBook-Michael ~ % brew link --overwrite angular-cli
    Linking /usr/local/Cellar/angular-cli/12.2.6... 1 symlinks created.
    michaelaidan@MacBook-Michael ~ % cd Documents/Dev/Etude/OC-Formation/Fullstack
    michaelaidan@MacBook-Michael Fullstack % ls
    frontend
    michaelaidan@MacBook-Michael Fullstack % cd frontend
    michaelaidan@MacBook-Michael frontend % npm install
    npm ERR! code ENOENT
    npm ERR! syscall open
    npm ERR! path /Users/michaelaidan/Documents/Dev/Etude/OC-Formation/Fullstack/frontend/package.json
    npm ERR! errno -2
    npm ERR! enoent ENOENT: no such file or directory, open '/Users/michaelaidan/Documents/Dev/Etude/OC-Formation/Fullstack/frontend/package.json'
    npm ERR! enoent This is related to npm not being able to find a file.
    npm ERR! enoent 
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /Users/michaelaidan/.npm/_logs/2021-09-22T17_29_56_759Z-debug.log
    michaelaidan@MacBook-Michael frontend % 
    



    • Partager sur Facebook
    • Partager sur Twitter
      23 septembre 2021 à 16:21:17

      il me semble que tu n'as pas fait la commande du git clone (et donc que tu n'as pas récupéré les fichiers+dossiers sur le git indiqué dans le cours)
      • Partager sur Facebook
      • Partager sur Twitter
        24 septembre 2021 à 10:38:07

        umfred a écrit:

        il me semble que tu n'as pas fait la commande du git clone (et donc que tu n'as pas récupéré les fichiers+dossiers sur le git indiqué dans le cours

        umfred a écrit:

        il me semble que tu n'as pas fait la commande du git clone (et donc que tu n'as pas récupéré les fichiers+dossiers sur le git indiqué dans le cours)

        Ah pourtant si je l'ai fait mais je ne parviens pas a lancer ng serve sur mac je vais essayer sur windows tout de meme 

        • Partager sur Facebook
        • Partager sur Twitter
          24 septembre 2021 à 15:55:42

          le message indique qu'il ne trouve pas package.json qui fait partie des fichiers du projet sur git (ou alors c'est une question de niveau d'arborescence (la commande n'est pas faite dans le bon dossier)

          • Partager sur Facebook
          • Partager sur Twitter
            27 septembre 2021 à 11:29:10

            non , pour moi, il faut être dans le répertoire go-fullstack-fr-frontend. Dans le répertoire que tu nous montres, il n'y a pas de package.json, mais un package-lock.json (cf le contenu du github du cours https://github.com/OpenClassrooms-Student-Center/go-fullstack-fr-frontend )

            -
            Edité par umfred 27 septembre 2021 à 11:30:25

            • Partager sur Facebook
            • Partager sur Twitter

            Installation Environnement Fullstack sur Mac

            × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
            × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
            • Editeur
            • Markdown