Solucionado (ver solução)
Solucionado
(ver solução)
4
respostas

Dependências Transitivas - node_modules

Pessoal,

observei que que ao realizar os comandos de install do npm para as bibliotecas babel-cli, babel-preset e systemjs todas as bibliotecas de dependência transitiva delas foram baixadas junto no diretorio node_modules do projeto, ou seja, dentro do diretorio node_modules que deveria ter apenas 4 subdiretórios:

- node_modules
|-- .bin
|-- babel-cli
|-- babel-preset-es2015
|-- systemjs

Tenho ao total 244 subdiretórios!!! As dependencias foram importadas com o parametro --save-dev conforme orientação.

Minha versão do NodeJS é o 6.11.0 e o NPM é 3.10.10

Alguém já passou por isso?

Segue abaixo meu arquivo package.json do projeto:

{
  "name": "client",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "build": "babel js/app-es6 -d js/app --source-maps",
    "watch": "babel js/app-es6 -d js/app --source-maps --watch"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "babel-cli": "^6.10.1",
    "babel-preset-es2015": "^6.9.0"
  },
  "dependencies": {
    "systemjs": "^0.19.31"
  }
}

E por fim o resultado do comando "dir" dentro do diretório "node_modules"

04/08/2017  01:17    <DIR>          .
04/08/2017  01:17    <DIR>          ..
03/08/2017  22:40    <DIR>          .bin
03/08/2017  22:35    <DIR>          ajv
03/08/2017  22:36    <DIR>          ansi-regex
03/08/2017  22:37    <DIR>          ansi-styles
03/08/2017  22:35    <DIR>          anymatch
03/08/2017  22:35    <DIR>          arr-diff
03/08/2017  22:37    <DIR>          arr-flatten
03/08/2017  22:38    <DIR>          array-find-index
03/08/2017  22:36    <DIR>          array-uniq
03/08/2017  22:37    <DIR>          array-unique
03/08/2017  22:33    <DIR>          asn1
03/08/2017  22:37    <DIR>          assert-plus
03/08/2017  22:36    <DIR>          async-each
03/08/2017  22:37    <DIR>          asynckit
03/08/2017  22:36    <DIR>          aws-sign2
03/08/2017  22:33    <DIR>          aws4
03/08/2017  22:36    <DIR>          babel-cli
03/08/2017  22:38    <DIR>          babel-code-frame
03/08/2017  22:36    <DIR>          babel-core
03/08/2017  22:38    <DIR>          babel-generator
03/08/2017  22:40    <DIR>          babel-helper-call-delegate
03/08/2017  22:39    <DIR>          babel-helper-define-map
03/08/2017  22:40    <DIR>          babel-helper-function-name
03/08/2017  22:40    <DIR>          babel-helper-get-function-arity
03/08/2017  22:40    <DIR>          babel-helper-hoist-variables
03/08/2017  22:41    <DIR>          babel-helper-optimise-call-expression
03/08/2017  22:38    <DIR>          babel-helper-regex
03/08/2017  22:40    <DIR>          babel-helper-replace-supers
03/08/2017  22:37    <DIR>          babel-helpers
03/08/2017  22:37    <DIR>          babel-messages
03/08/2017  22:41    <DIR>          babel-plugin-check-es2015-constants
03/08/2017  22:42    <DIR>          babel-plugin-transform-es2015-arrow-functions
03/08/2017  22:42    <DIR>          babel-plugin-transform-es2015-block-scoped-functions
03/08/2017  22:41    <DIR>          babel-plugin-transform-es2015-block-scoping
03/08/2017  22:41    <DIR>          babel-plugin-transform-es2015-classes
03/08/2017  22:42    <DIR>          babel-plugin-transform-es2015-computed-properties
03/08/2017  22:41    <DIR>          babel-plugin-transform-es2015-destructuring
03/08/2017  22:42    <DIR>          babel-plugin-transform-es2015-duplicate-keys
03/08/2017  22:41    <DIR>          babel-plugin-transform-es2015-for-of
03/08/2017  22:41    <DIR>          babel-plugin-transform-es2015-function-name
03/08/2017  22:41    <DIR>          babel-plugin-transform-es2015-literals
03/08/2017  22:42    <DIR>          babel-plugin-transform-es2015-modules-commonjs
03/08/2017  22:41    <DIR>          babel-plugin-transform-es2015-object-super
03/08/2017  22:41    <DIR>          babel-plugin-transform-es2015-parameters
03/08/2017  22:42    <DIR>          babel-plugin-transform-es2015-shorthand-properties
03/08/2017  22:41    <DIR>          babel-plugin-transform-es2015-spread
03/08/2017  22:41    <DIR>          babel-plugin-transform-es2015-sticky-regex
03/08/2017  22:42    <DIR>          babel-plugin-transform-es2015-template-literals
03/08/2017  22:41    <DIR>          babel-plugin-transform-es2015-typeof-symbol
03/08/2017  22:41    <DIR>          babel-plugin-transform-es2015-unicode-regex
03/08/2017  22:41    <DIR>          babel-plugin-transform-regenerator
03/08/2017  22:41    <DIR>          babel-plugin-transform-strict-mode
03/08/2017  22:40    <DIR>          babel-polyfill
03/08/2017  22:38    <DIR>          babel-preset-es2015
03/08/2017  22:40    <DIR>          babel-register
03/08/2017  22:37    <DIR>          babel-runtime
03/08/2017  22:38    <DIR>          babel-template
03/08/2017  22:38    <DIR>          babel-traverse
03/08/2017  22:37    <DIR>          babel-types
03/08/2017  22:35    <DIR>          babylon
03/08/2017  22:38    <DIR>          balanced-match
03/08/2017  22:37    <DIR>          bcrypt-pbkdf
03/08/2017  22:37    <DIR>          bin-version
03/08/2017  22:39    <DIR>          bin-version-check
03/08/2017  22:40    <DIR>          binary-extensions
03/08/2017  22:35    <DIR>          boom
03/08/2017  22:38    <DIR>          brace-expansion
03/08/2017  22:34    <DIR>          braces
03/08/2017  22:39    <DIR>          builtin-modules
03/08/2017  22:36    <DIR>          camelcase
03/08/2017  22:38    <DIR>          camelcase-keys
03/08/2017  22:36    <DIR>          caseless
03/08/2017  22:34    <DIR>          chalk
03/08/2017  22:36    <DIR>          chokidar
03/08/2017  22:32    <DIR>          co
03/08/2017  22:38    <DIR>          combined-stream
03/08/2017  22:36    <DIR>          commander
03/08/2017  22:37    <DIR>          concat-map
03/08/2017  22:39    <DIR>          convert-source-map
03/08/2017  22:35    <DIR>          core-js
03/08/2017  22:37    <DIR>          core-util-is
03/08/2017  22:36    <DIR>          cryptiles
03/08/2017  22:38    <DIR>          currently-unhandled
03/08/2017  22:35    <DIR>          dashdash
03/08/2017  22:35    <DIR>          debug
03/08/2017  22:36    <DIR>          decamelize
03/08/2017  22:37    <DIR>          delayed-stream
03/08/2017  22:37    <DIR>          detect-indent
03/08/2017  22:35    <DIR>          ecc-jsbn
03/08/2017  22:35    <DIR>          error-ex
03/08/2017  22:39    <DIR>          escape-string-regexp
03/08/2017  22:35    <DIR>          esutils
03/08/2017  22:38    <DIR>          expand-brackets
03/08/2017  22:37    <DIR>          expand-range
03/08/2017  22:35    <DIR>          extend
03/08/2017  22:35    <DIR>          extglob
03/08/2017  22:36    <DIR>          extsprintf
03/08/2017  22:37    <DIR>          filename-regex
03/08/2017  22:36    <DIR>          fill-range
03/08/2017  22:35    <DIR>          find-up
03/08/2017  22:37    <DIR>          find-versions
03/08/2017  22:34    <DIR>          for-in
03/08/2017  22:35    <DIR>          for-own
03/08/2017  22:37    <DIR>          forever-agent
03/08/2017  22:36    <DIR>          form-data
03/08/2017  22:39    <DIR>          fs-readdir-recursive
03/08/2017  22:36    <DIR>          get-stdin
03/08/2017  22:35    <DIR>          getpass
03/08/2017  22:33    <DIR>          glob
03/08/2017  22:36    <DIR>          glob-base
03/08/2017  22:36    <DIR>          glob-parent
03/08/2017  22:35    <DIR>          globals
03/08/2017  22:38    <DIR>          graceful-fs
03/08/2017  22:36    <DIR>          har-schema
03/08/2017  22:37    <DIR>          har-validator
03/08/2017  22:35    <DIR>          has-ansi
03/08/2017  22:34    <DIR>          hawk
03/08/2017  22:35    <DIR>          hoek
03/08/2017  22:36    <DIR>          home-or-tmp
03/08/2017  22:38    <DIR>          hosted-git-info
03/08/2017  22:38    <DIR>          http-signature
03/08/2017  22:37    <DIR>          indent-string
03/08/2017  22:35    <DIR>          inflight
03/08/2017  22:37    <DIR>          inherits
03/08/2017  22:37    <DIR>          invariant
03/08/2017  22:37    <DIR>          is-arrayish
03/08/2017  22:37    <DIR>          is-binary-path
03/08/2017  22:36    <DIR>          is-buffer
03/08/2017  22:38    <DIR>          is-builtin-module
03/08/2017  22:36    <DIR>          is-dotfile
03/08/2017  22:38    <DIR>          is-equal-shallow
03/08/2017  22:37    <DIR>          is-extendable
03/08/2017  22:36    <DIR>          is-extglob
03/08/2017  22:36    <DIR>          is-finite
03/08/2017  22:35    <DIR>          is-glob
03/08/2017  22:36    <DIR>          is-number
03/08/2017  22:38    <DIR>          is-posix-bracket
03/08/2017  22:37    <DIR>          is-primitive
03/08/2017  22:37    <DIR>          is-typedarray
03/08/2017  22:35    <DIR>          is-utf8
03/08/2017  22:35    <DIR>          isarray
03/08/2017  22:35    <DIR>          isobject
03/08/2017  22:35    <DIR>          isstream
03/08/2017  22:36    <DIR>          js-tokens
03/08/2017  22:33    <DIR>          jsbn
03/08/2017  22:35    <DIR>          jsesc
03/08/2017  22:40    <DIR>          json-schema
03/08/2017  22:39    <DIR>          json-stable-stringify
03/08/2017  22:38    <DIR>          json-stringify-safe
03/08/2017  22:34    <DIR>          json5
03/08/2017  22:36    <DIR>          jsonify
03/08/2017  22:34    <DIR>          jsprim
03/08/2017  22:35    <DIR>          kind-of
03/08/2017  22:37    <DIR>          load-json-file
03/08/2017  22:39    <DIR>          lodash
03/08/2017  22:37    <DIR>          log-symbols
03/08/2017  22:38    <DIR>          loose-envify
03/08/2017  22:37    <DIR>          loud-rejection
03/08/2017  22:35    <DIR>          map-obj
03/08/2017  22:33    <DIR>          meow
03/08/2017  22:36    <DIR>          micromatch
03/08/2017  22:35    <DIR>          mime-db
03/08/2017  22:36    <DIR>          mime-types
03/08/2017  22:36    <DIR>          minimatch
03/08/2017  22:37    <DIR>          minimist
03/08/2017  22:36    <DIR>          mkdirp
03/08/2017  22:32    <DIR>          ms
03/08/2017  22:40    <DIR>          normalize-package-data
03/08/2017  22:37    <DIR>          normalize-path
03/08/2017  22:37    <DIR>          number-is-nan
03/08/2017  22:36    <DIR>          oauth-sign
03/08/2017  22:37    <DIR>          object-assign
03/08/2017  22:37    <DIR>          object.omit
03/08/2017  22:33    <DIR>          once
03/08/2017  22:36    <DIR>          os-homedir
03/08/2017  22:36    <DIR>          os-tmpdir
03/08/2017  22:38    <DIR>          output-file-sync
03/08/2017  22:36    <DIR>          parse-glob
03/08/2017  22:36    <DIR>          parse-json
03/08/2017  22:37    <DIR>          path-exists
03/08/2017  22:38    <DIR>          path-is-absolute
03/08/2017  22:36    <DIR>          path-type
03/08/2017  22:39    <DIR>          performance-now
03/08/2017  22:33    <DIR>          pify
03/08/2017  22:34    <DIR>          pinkie
03/08/2017  22:37    <DIR>          pinkie-promise
03/08/2017  22:36    <DIR>          preserve
03/08/2017  22:35    <DIR>          private
03/08/2017  22:39    <DIR>          process-nextick-args
03/08/2017  22:37    <DIR>          punycode
03/08/2017  22:33    <DIR>          qs
03/08/2017  22:36    <DIR>          randomatic
03/08/2017  22:35    <DIR>          read-pkg
03/08/2017  22:37    <DIR>          read-pkg-up
03/08/2017  22:40    <DIR>          readable-stream
03/08/2017  22:36    <DIR>          readdirp
03/08/2017  22:34    <DIR>          redent
03/08/2017  22:37    <DIR>          regenerate
03/08/2017  22:39    <DIR>          regenerator-runtime
03/08/2017  22:39    <DIR>          regenerator-transform
03/08/2017  22:37    <DIR>          regex-cache
03/08/2017  22:38    <DIR>          regexpu-core
03/08/2017  22:35    <DIR>          regjsgen
03/08/2017  22:37    <DIR>          regjsparser
03/08/2017  22:40    <DIR>          remove-trailing-separator
03/08/2017  22:37    <DIR>          repeat-element
03/08/2017  22:37    <DIR>          repeat-string
03/08/2017  22:36    <DIR>          repeating
03/08/2017  22:35    <DIR>          request
03/08/2017  22:37    <DIR>          safe-buffer
03/08/2017  22:37    <DIR>          semver
03/08/2017  22:37    <DIR>          semver-regex
03/08/2017  22:38    <DIR>          semver-truncate
03/08/2017  22:38    <DIR>          set-immediate-shim
03/08/2017  22:37    <DIR>          signal-exit
03/08/2017  22:34    <DIR>          slash
03/08/2017  22:33    <DIR>          sntp
03/08/2017  22:37    <DIR>          source-map
03/08/2017  22:41    <DIR>          source-map-support
03/08/2017  22:37    <DIR>          spdx-correct
03/08/2017  22:39    <DIR>          spdx-expression-parse
03/08/2017  22:42    <DIR>          spdx-license-ids
03/08/2017  22:34    <DIR>          sshpk
03/08/2017  22:38    <DIR>          stringstream
03/08/2017  22:40    <DIR>          string_decoder
03/08/2017  22:36    <DIR>          strip-ansi
03/08/2017  22:36    <DIR>          strip-bom
03/08/2017  22:37    <DIR>          strip-indent
03/08/2017  22:40    <DIR>          supports-color
04/08/2017  01:17    <DIR>          systemjs
03/08/2017  22:40    <DIR>          to-fast-properties
03/08/2017  22:37    <DIR>          tough-cookie
03/08/2017  22:37    <DIR>          trim-newlines
03/08/2017  22:36    <DIR>          trim-right
03/08/2017  22:37    <DIR>          tunnel-agent
03/08/2017  22:39    <DIR>          tweetnacl
03/08/2017  22:36    <DIR>          user-home
03/08/2017  22:40    <DIR>          util-deprecate
03/08/2017  22:34    <DIR>          uuid
03/08/2017  22:35    <DIR>          v8flags
03/08/2017  22:42    <DIR>          validate-npm-package-license
03/08/2017  22:35    <DIR>          verror
04/08/2017  01:17    <DIR>          when
03/08/2017  22:34    <DIR>          wrappy
               0 arquivo(s)              0 bytes
             246 pasta(s)   62.460.874.752 bytes disponíveis
4 respostas
solução!

Com Node 6 ou superior as pastas fica na raiz do node_modules para resolver problemas na plataforma Windows de limite de tamanho de caminho de diretório.

Fique tranquilo que não há problema nenhum.

Entendido, Flavio! Apenas a titulo de curiosidade, dessa forma ao publicar a aplicação, sempre será necessário enviar todo o diretório do node_modules junto?

Quando publicamos não enviamos node_modules. O host, na hora da publicação faz o npm install. Node_modules pode ter arquivos compilados para seu SO e compartilha-lo causará problemas em outros SO.

Sucesso e bom estudo Fábio!

Positivo e Operante!

Mais uma vez parabéns pelos cursos!