How to create react app using create-react-app with reactjs 15 version [closed] - node.js

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I have a project which is written 3 years ago in reactjs 15 version and also it is single tier architecture project. I am right now converting it to 3 tier project architecture. So I thought of having the react part alone. My question is how should I create a reactJS folder structure using the new create-react-app and add the already existing code into it. I know this question might be broad. But any steps will help me to better understand the structure to be followed in react. Its been like only 2 months I am learning reactjs.
"react": "^15.6.1",
"react-csv": "^1.0.8",
"react-custom-scrollbars": "^4.2.1",
"react-dom": "^15.6.1",
"react-dropzone": "^4.2.3",
"react-flipcard": "^0.2.1",
"react-notification-system": "^0.2.16",
"react-pdf": "^2.4.2",
"react-router": "^3.0.0",
"react-router-dom": "^4.2.2",
"react-stars": "^2.2.5",
"react-table": "^6.7.4",
"react-tabs-navigation": "^0.4.4",
"react-toastr": "^2.8.2",
"semantic-ui-react": "^0.63.5",
"superagent": "^3.8.1",
"universal-cookie": "^2.1.0",
"url-loader": "^4.1.0",
"x-frame-options": "^1.0.0"

I would recommend you to make components folder in src folder. There you can structure components to atoms, molecules, organisms, templates and pages if you are a fan of a Atomic design as I am. From there every component should be separated in separate folder and have component.types.js/ts, component.constants.js/ts, component.scss, component.js/tsx. Types would refer to prop and any other types related to that component. Constants, components and scss file are quite obvious as for what they are used. Also you can have test folder in every component where you can write tests.
Also you can have common folder in src where you can put your utility files, for example custom hooks, http setup etc.
Another important folder in src is config. All config your app needs can be in there in different files if that is needed.
Last but not the least is assests foloder inside src. As name suggests you put all of your static assets (fonts, images, videos...).
I think this is very good basis to start from and expand your folder structure as you see fit and as project is needed. Also none of this i strict to naming but those are some conventions that you can read here.
awesome-app
├── src
│ ├── components
│ │ ├── atoms
│ │ │ ├── button
│ │ │ │ ├── button.types.ts
│ │ │ │ ├── button.component.tsx
│ │ │ │ ├── button.constants.ts
│ │ │ │ ├── button.scss
│ │ │ │ ├── test
│ │ │ │ ├── button.test.tsx
│ │ │ │ └── ...
│ │ │ └── ...
│ │ ├── molecules
│ │ │ ├── action-card
│ │ │ │ ├── action-card.types.ts
│ │ │ │ ├── action-card.component.tsx
│ │ │ │ ├── action-card.constants.ts
│ │ │ │ ├── action-card.scss
│ │ │ │ ├── test
│ │ │ │ ├── action-card.test.tsx
│ │ │ │ └── ...
│ │ │ └── ...
│ │ ├── organisms
│ │ │ ├── school-module-row
│ │ │ │ ├── school-module-row.types.ts
│ │ │ │ ├── school-module-row.component.tsx
│ │ │ │ ├── school-module-row.constants.ts
│ │ │ │ ├── school-module-row.scss
│ │ │ │ ├── test
│ │ │ │ ├── school-module-row.test.tsx
│ │ │ │ └── ...
│ │ │ └── ...
│ │ ├── pages
│ │ │ ├── users-page
│ │ │ │ ├── users-page.types.ts
│ │ │ │ ├── users-page.component.tsx
│ │ │ │ ├── users-page.constants.ts
│ │ │ │ ├── users-page.scss
│ │ │ │ ├── test
│ │ │ │ ├── users-page.test.tsx
│ │ │ │ └── ...
│ │ │ └── ...
│ ├── styles
│ │ ├── base
│ │ │ ├── _base.scss
│ │ │ ├── _font.scss
│ │ │ └── ...
│ │ └── ...
│ │
│ ├── assets
│ │ ├── fonts
│ │ │ └── ...
│ │ ├── images
│ │ │ └── ...
│ │ └── ...
│ ├── config
│ │ └── ...
│ └── redux
└── actions
└── ...

Related

Jhipster : cannot use jhipster-generator

I want to try new version of jhipster but i am not able to generate a sample project. I have a jhipster error :
I install npm, yo, bower, generator-jhipster as suggested in the Jhipster documentation.
generator-jhipster installation :
npm install -g generator-jhipster
/Users/myuser/npm/bin/jhipster -> /Users/myuser/npm/lib/node_modules/generator-jhipster/cli/jhipster.js
> generator-jhipster#4.6.2 install /Users/myuser/npm/lib/node_modules/generator-jhipster
> tabtab install --name jhipster --auto
tabtab:installer Installing completion script to bashrc directory +0ms
tabtab:installer Installing completion script to /Users/myuser/.bashrc directory +6ms
tabtab:installer Writing to /Users/myuser/.bashrc file in append mode +1ms
tabtab:installer Writing actual completion script to /Users/myuser/npm/lib/node_modules/generator-jhipster/node_modules/tabtab/.completions/jhipster.bash +1ms
tabtab:installer Already installed jhipster in /Users/myuser/.bashrc +3ms
> spawn-sync#1.0.15 postinstall /Users/myuser/npm/lib/node_modules/generator-jhipster/node_modules/spawn-sync
> node postinstall
/Users/myuser/npm/lib
└─┬ generator-jhipster#4.6.2
├─┬ chalk#2.0.1
│ ├─┬ ansi-styles#3.2.0
│ │ └─┬ color-convert#1.9.0
│ │ └── color-name#1.1.3
│ ├── escape-string-regexp#1.0.5
│ └─┬ supports-color#4.2.1
│ └── has-flag#2.0.0
├─┬ cheerio#0.22.0
│ ├─┬ css-select#1.2.0
│ │ ├── boolbase#1.0.0
│ │ ├── css-what#2.1.0
│ │ ├── domutils#1.5.1
│ │ └── nth-check#1.0.1
│ ├─┬ dom-serializer#0.1.0
│ │ └── domelementtype#1.1.3
│ ├── entities#1.1.1
│ ├─┬ htmlparser2#3.9.2
│ │ ├── domelementtype#1.3.0
│ │ ├── domhandler#2.4.1
│ │ └─┬ readable-stream#2.3.3
│ │ ├── core-util-is#1.0.2
│ │ ├── isarray#1.0.0
│ │ ├── process-nextick-args#1.0.7
│ │ ├── string_decoder#1.0.3
│ │ └── util-deprecate#1.0.2
│ ├── lodash.assignin#4.2.0
│ ├── lodash.bind#4.2.1
│ ├── lodash.defaults#4.2.0
│ ├── lodash.filter#4.6.0
│ ├── lodash.flatten#4.4.0
│ ├── lodash.foreach#4.5.0
│ ├── lodash.map#4.6.0
│ ├── lodash.merge#4.6.0
│ ├── lodash.pick#4.4.0
│ ├── lodash.reduce#4.6.0
│ ├── lodash.reject#4.6.0
│ └── lodash.some#4.6.0
├─┬ commander#2.10.0
│ └── graceful-readlink#1.0.1
├── didyoumean#1.2.1
├── ejs#2.5.6
├─┬ glob#7.1.2
│ ├── fs.realpath#1.0.0
│ ├─┬ inflight#1.0.6
│ │ └── wrappy#1.0.2
│ ├── inherits#2.0.3
│ ├─┬ minimatch#3.0.4
│ │ └─┬ brace-expansion#1.1.8
│ │ ├── balanced-match#1.0.0
│ │ └── concat-map#0.0.1
│ ├── once#1.4.0
│ └── path-is-absolute#1.0.1
├─┬ html-wiring#1.2.0
│ ├─┬ cheerio#0.19.0
│ │ ├─┬ css-select#1.0.0
│ │ │ ├── css-what#1.0.0
│ │ │ └── domutils#1.4.3
│ │ ├─┬ htmlparser2#3.8.3
│ │ │ ├── domhandler#2.3.0
│ │ │ ├── domutils#1.5.1
│ │ │ ├── entities#1.0.0
│ │ │ └─┬ readable-stream#1.1.14
│ │ │ ├── isarray#0.0.1
│ │ │ └── string_decoder#0.10.31
│ │ └── lodash#3.10.1
│ └─┬ detect-newline#1.0.3
│ └── get-stdin#4.0.1
├─┬ insight#0.8.4
│ ├── async#1.5.2
│ ├─┬ chalk#1.1.3
│ │ ├── ansi-styles#2.2.1
│ │ ├── has-ansi#2.0.0
│ │ └── supports-color#2.0.0
│ ├─┬ configstore#1.4.0
│ │ ├── graceful-fs#4.1.11
│ │ ├── os-tmpdir#1.0.2
│ │ ├── osenv#0.1.4
│ │ ├── uuid#2.0.3
│ │ ├─┬ write-file-atomic#1.3.4
│ │ │ ├── imurmurhash#0.1.4
│ │ │ └── slide#1.1.6
│ │ └── xdg-basedir#2.0.0
│ ├─┬ inquirer#0.10.1
│ │ ├── ansi-escapes#1.4.0
│ │ ├── ansi-regex#2.1.1
│ │ ├─┬ chalk#1.1.3
│ │ │ ├── ansi-styles#2.2.1
│ │ │ └── supports-color#2.0.0
│ │ ├─┬ cli-cursor#1.0.2
│ │ │ └─┬ restore-cursor#1.0.1
│ │ │ ├── exit-hook#1.1.1
│ │ │ └── onetime#1.1.0
│ │ ├── cli-width#1.1.1
│ │ ├── figures#1.7.0
│ │ ├── lodash#3.10.1
│ │ ├─┬ readline2#1.0.1
│ │ │ ├── code-point-at#1.1.0
│ │ │ ├─┬ is-fullwidth-code-point#1.0.0
│ │ │ │ └── number-is-nan#1.0.1
│ │ │ └── mute-stream#0.0.5
│ │ ├── run-async#0.1.0
│ │ ├── rx-lite#3.1.2
│ │ ├── strip-ansi#3.0.1
│ │ └── through#2.3.8
│ ├─┬ lodash.debounce#3.1.1
│ │ └── lodash._getnative#3.9.1
│ ├── object-assign#4.1.1
│ ├─┬ os-name#1.0.3
│ │ ├── osx-release#1.1.0
│ │ └── win-release#1.1.1
│ ├─┬ request#2.81.0
│ │ ├── aws-sign2#0.6.0
│ │ ├── aws4#1.6.0
│ │ ├── caseless#0.12.0
│ │ ├─┬ combined-stream#1.0.5
│ │ │ └── delayed-stream#1.0.0
│ │ ├── extend#3.0.1
│ │ ├── forever-agent#0.6.1
│ │ ├─┬ form-data#2.1.4
│ │ │ └── asynckit#0.4.0
│ │ ├─┬ har-validator#4.2.1
│ │ │ ├─┬ ajv#4.11.8
│ │ │ │ ├── co#4.6.0
│ │ │ │ └─┬ json-stable-stringify#1.0.1
│ │ │ │ └── jsonify#0.0.0
│ │ │ └── har-schema#1.0.5
│ │ ├─┬ hawk#3.1.3
│ │ │ ├── boom#2.10.1
│ │ │ ├── cryptiles#2.0.5
│ │ │ ├── hoek#2.16.3
│ │ │ └── sntp#1.0.9
│ │ ├─┬ http-signature#1.1.1
│ │ │ ├── assert-plus#0.2.0
│ │ │ ├─┬ jsprim#1.4.0
│ │ │ │ ├── assert-plus#1.0.0
│ │ │ │ ├── extsprintf#1.0.2
│ │ │ │ ├── json-schema#0.2.3
│ │ │ │ └── verror#1.3.6
│ │ │ └─┬ sshpk#1.13.1
│ │ │ ├── asn1#0.2.3
│ │ │ ├── assert-plus#1.0.0
│ │ │ ├── bcrypt-pbkdf#1.0.1
│ │ │ ├─┬ dashdash#1.14.1
│ │ │ │ └── assert-plus#1.0.0
│ │ │ ├── ecc-jsbn#0.1.1
│ │ │ ├─┬ getpass#0.1.7
│ │ │ │ └── assert-plus#1.0.0
│ │ │ ├── jsbn#0.1.1
│ │ │ └── tweetnacl#0.14.5
│ │ ├── is-typedarray#1.0.0
│ │ ├── isstream#0.1.2
│ │ ├── json-stringify-safe#5.0.1
│ │ ├─┬ mime-types#2.1.16
│ │ │ └── mime-db#1.29.0
│ │ ├── oauth-sign#0.8.2
│ │ ├── performance-now#0.2.0
│ │ ├── qs#6.4.0
│ │ ├── safe-buffer#5.1.1
│ │ ├── stringstream#0.0.5
│ │ └── tunnel-agent#0.6.0
│ ├─┬ tough-cookie#2.3.2
│ │ └── punycode#1.4.1
│ └── uuid#3.1.0
├── jhipster-core#1.3.5
├─┬ js-yaml#3.9.0
│ ├─┬ argparse#1.0.9
│ │ └── sprintf-js#1.0.3
│ └── esprima#4.0.0
├── lodash#4.17.4
├─┬ meow#3.7.0
│ ├─┬ camelcase-keys#2.1.0
│ │ └── camelcase#2.1.1
│ ├── decamelize#1.2.0
│ ├─┬ loud-rejection#1.6.0
│ │ ├─┬ currently-unhandled#0.4.1
│ │ │ └── array-find-index#1.0.2
│ │ └── signal-exit#3.0.2
│ ├── map-obj#1.0.1
│ ├── minimist#1.2.0
│ ├─┬ normalize-package-data#2.4.0
│ │ ├── hosted-git-info#2.5.0
│ │ ├─┬ is-builtin-module#1.0.0
│ │ │ └── builtin-modules#1.1.1
│ │ └─┬ validate-npm-package-license#3.0.1
│ │ ├─┬ spdx-correct#1.0.2
│ │ │ └── spdx-license-ids#1.2.2
│ │ └── spdx-expression-parse#1.0.4
│ ├─┬ read-pkg-up#1.0.1
│ │ ├─┬ find-up#1.1.2
│ │ │ └── path-exists#2.1.0
│ │ └─┬ read-pkg#1.1.0
│ │ ├─┬ load-json-file#1.1.0
│ │ │ └─┬ parse-json#2.2.0
│ │ │ └─┬ error-ex#1.3.1
│ │ │ └── is-arrayish#0.2.1
│ │ └── path-type#1.1.0
│ ├─┬ redent#1.0.0
│ │ ├─┬ indent-string#2.1.0
│ │ │ └─┬ repeating#2.0.1
│ │ │ └── is-finite#1.0.2
│ │ └── strip-indent#1.0.1
│ └── trim-newlines#1.0.0
├─┬ mkdirp#0.5.1
│ └── minimist#0.0.8
├── pluralize#5.0.0
├─┬ randexp#0.4.5
│ ├── discontinuous-range#1.0.0
│ └── ret#0.1.14
├── semver#5.3.0
├─┬ shelljs#0.7.8
│ ├── interpret#1.0.3
│ └─┬ rechoir#0.6.2
│ └─┬ resolve#1.4.0
│ └── path-parse#1.0.5
├─┬ tabtab#2.2.2
│ ├─┬ debug#2.6.8
│ │ └── ms#2.0.0
│ ├─┬ inquirer#1.2.3
│ │ ├─┬ chalk#1.1.3
│ │ │ ├── ansi-styles#2.2.1
│ │ │ └── supports-color#2.0.0
│ │ ├── cli-width#2.1.0
│ │ ├─┬ external-editor#1.1.1
│ │ │ ├─┬ spawn-sync#1.0.15
│ │ │ │ ├─┬ concat-stream#1.6.0
│ │ │ │ │ └── typedarray#0.0.6
│ │ │ │ └── os-shim#0.1.3
│ │ │ └── tmp#0.0.29
│ │ ├── mute-stream#0.0.6
│ │ ├─┬ pinkie-promise#2.0.1
│ │ │ └── pinkie#2.0.4
│ │ ├── run-async#2.3.0
│ │ ├── rx#4.1.0
│ │ └── string-width#1.0.2
│ ├── lodash.difference#4.5.0
│ ├── lodash.uniq#4.5.0
│ └─┬ npmlog#2.0.4
│ ├── ansi#0.3.1
│ ├─┬ are-we-there-yet#1.1.4
│ │ └── delegates#1.0.0
│ └─┬ gauge#1.2.7
│ ├── has-unicode#2.0.1
│ ├── lodash.pad#4.5.1
│ ├── lodash.padend#4.6.1
│ └── lodash.padstart#4.6.1
├─┬ yeoman-environment#2.0.0
│ ├─┬ chalk#1.1.3
│ │ ├── ansi-styles#2.2.1
│ │ └── supports-color#2.0.0
│ ├── diff#3.3.0
│ ├─┬ globby#6.1.0
│ │ ├─┬ array-union#1.0.2
│ │ │ └── array-uniq#1.0.3
│ │ └── pify#2.3.0
│ ├── grouped-queue#0.3.3
│ ├─┬ inquirer#3.2.1
│ │ ├── ansi-escapes#2.0.0
│ │ ├─┬ chalk#2.0.1
│ │ │ ├── ansi-styles#3.2.0
│ │ │ └── supports-color#4.2.1
│ │ ├─┬ cli-cursor#2.1.0
│ │ │ └─┬ restore-cursor#2.0.0
│ │ │ └─┬ onetime#2.0.1
│ │ │ └── mimic-fn#1.1.0
│ │ ├── cli-width#2.1.0
│ │ ├─┬ external-editor#2.0.4
│ │ │ ├── iconv-lite#0.4.18
│ │ │ ├── jschardet#1.5.0
│ │ │ └── tmp#0.0.31
│ │ ├── figures#2.0.0
│ │ ├── mute-stream#0.0.7
│ │ ├── run-async#2.3.0
│ │ ├── rx-lite#4.0.8
│ │ ├── rx-lite-aggregates#4.0.8
│ │ ├─┬ string-width#2.1.1
│ │ │ ├── is-fullwidth-code-point#2.0.0
│ │ │ └── strip-ansi#4.0.0
│ │ └─┬ strip-ansi#4.0.0
│ │ └── ansi-regex#3.0.0
│ ├─┬ is-scoped#1.0.0
│ │ └── scoped-regex#1.0.0
│ ├─┬ log-symbols#1.0.2
│ │ └─┬ chalk#1.1.3
│ │ ├── ansi-styles#2.2.1
│ │ └── supports-color#2.0.0
│ ├─┬ mem-fs#1.1.3
│ │ ├─┬ vinyl#1.2.0
│ │ │ ├── clone#1.0.2
│ │ │ ├── clone-stats#0.0.1
│ │ │ └── replace-ext#0.0.1
│ │ └─┬ vinyl-file#2.0.0
│ │ ├─┬ strip-bom#2.0.0
│ │ │ └── is-utf8#0.2.1
│ │ └─┬ strip-bom-stream#2.0.0
│ │ └── first-chunk-stream#2.0.0
│ ├── text-table#0.2.0
│ └── untildify#3.0.2
└─┬ yeoman-generator#1.1.1
├── async#2.5.0
├─┬ chalk#1.1.3
│ ├── ansi-styles#2.2.1
│ └── supports-color#2.0.0
├─┬ class-extend#0.1.2
│ └── object-assign#2.1.1
├─┬ cli-table#0.3.1
│ └── colors#1.0.3
├─┬ cross-spawn#5.1.0
│ ├─┬ lru-cache#4.1.1
│ │ ├── pseudomap#1.0.2
│ │ └── yallist#2.1.2
│ ├─┬ shebang-command#1.2.0
│ │ └── shebang-regex#1.0.0
│ └─┬ which#1.2.14
│ └── isexe#2.0.0
├── dargs#5.1.0
├── dateformat#2.0.0
├── detect-conflict#1.0.1
├─┬ error#7.0.2
│ ├── string-template#0.2.1
│ └── xtend#4.0.1
├─┬ find-up#2.1.0
│ └─┬ locate-path#2.0.0
│ ├─┬ p-locate#2.0.0
│ │ └── p-limit#1.1.0
│ └── path-exists#3.0.0
├─┬ github-username#3.0.0
│ └─┬ gh-got#5.0.0
│ ├─┬ got#6.7.1
│ │ ├─┬ create-error-class#3.0.2
│ │ │ └── capture-stack-trace#1.0.0
│ │ ├── duplexer3#0.1.4
│ │ ├── get-stream#3.0.0
│ │ ├── is-redirect#1.0.0
│ │ ├── is-retry-allowed#1.1.0
│ │ ├── is-stream#1.1.0
│ │ ├── lowercase-keys#1.0.0
│ │ ├── timed-out#4.0.1
│ │ ├── unzip-response#2.0.1
│ │ └─┬ url-parse-lax#1.0.0
│ │ └── prepend-http#1.0.4
│ └── is-plain-obj#1.1.0
├─┬ istextorbinary#2.1.0
│ ├── binaryextensions#2.0.0
│ ├── editions#1.3.3
│ └── textextensions#2.1.0
├─┬ mem-fs-editor#3.0.2
│ ├── commondir#1.0.1
│ ├── deep-extend#0.4.2
│ ├─┬ multimatch#2.1.0
│ │ ├── array-differ#1.0.0
│ │ └── arrify#1.0.1
│ └─┬ vinyl#2.1.0
│ ├── clone#2.1.1
│ ├── clone-buffer#1.0.0
│ ├── clone-stats#1.0.0
│ ├── cloneable-readable#1.0.0
│ ├── remove-trailing-separator#1.0.2
│ └── replace-ext#1.0.0
├── path-exists#3.0.0
├── pretty-bytes#4.0.2
├── read-chunk#2.0.0
├─┬ read-pkg-up#2.0.0
│ └─┬ read-pkg#2.0.0
│ ├─┬ load-json-file#2.0.0
│ │ └── strip-bom#3.0.0
│ └── path-type#2.0.0
├── rimraf#2.6.1
├─┬ run-async#2.3.0
│ └── is-promise#2.1.0
├── through2#2.0.3
├─┬ user-home#2.0.0
│ └── os-homedir#1.0.2
└─┬ yeoman-environment#1.6.6
├── diff#2.2.3
├─┬ globby#4.1.0
│ └── glob#6.0.4
├─┬ inquirer#1.2.3
│ ├── cli-width#2.1.0
│ └── mute-stream#0.0.6
└── untildify#2.1.0*
--
hubtalents-jhipster myuser$ yo jhipster
Error jhipster
You don't seem to have a generator with the name jhipster installed.
You can see available generators with npm search yeoman-generator and then install them with npm install [name].
To see the 1 registered generators run yo with the `--help` option.
I don't understand what's happen. The generator is installed without error but it's not found by yo. Is there a mistake in my configuration or install ?
Thanks
With the new version of JHipster, run only the command 'jhipster'
jhipster
And not 'yo jhipster'
I think you should probably type this in your command line interface:
update NPM: npm install -g npm
To install JHipster, type:
npm install -g generator-jhipster
Have you tried yarn? Let's say you are on Ubuntu, you can install yarn here and run these:
yarn global add yo
yarn global add generator-jhipster
Surely you can skip installing yo if it's already exists in PATH.
Check that npm, node and yarn are up to date, I had the same problem and I solved it by purging and reinstalling both.
if you are on ubuntu this might help.
Use jhipster upgrade assuming that your project meet the upgrade requirements - has a git repo containing a .yo-rc.json file and a .jhipster directory.

Passenger + Nginx + Node (Meteor) 100% CPU usage

I have a Meteor app deployed with Passenger + Nginx (as follow) on AWS EC2 instance under Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-62-generic x86_64)
The problem is that it takes around 100% CPU usage permanently.
I've tried to switch to more powerful instance and even deployed a blank app instead of mine - still the same.
Any ideas where to dig?
Thanks.
P.S.
var/log/nginx/error.log:
2017/02/08 08:04:20 [info] 18232#18232: Using 32768KiB of shared memory for nchan in /etc/nginx/nginx.conf:71
[ 2017-02-08 08:04:20.4123 18239/7fe378ac0780 age/Wat/WatchdogMain.cpp:1281 ]: Starting Passenger watchdog...
[ 2017-02-08 08:04:20.4281 18242/7f7adea7b780 age/Cor/CoreMain.cpp:1070 ]: Starting Passenger core...
[ 2017-02-08 08:04:20.4282 18242/7f7adea7b780 age/Cor/CoreMain.cpp:245 ]: Passenger core running in multi-application mode.
[ 2017-02-08 08:04:20.4309 18242/7f7adea7b780 age/Cor/CoreMain.cpp:820 ]: Passenger core online, PID 18242
[ 2017-02-08 08:04:20.4511 18248/7fdc44af6780 age/Ust/UstRouterMain.cpp:529 ]: Starting Passenger UstRouter...
[ 2017-02-08 08:04:20.4517 18248/7fdc44af6780 age/Ust/UstRouterMain.cpp:342 ]: Passenger UstRouter online, PID 18248
[ 2017-02-08 08:04:22.7236 18242/7f7ade98c700 age/Cor/SecurityUpdateChecker.h:464 ]: Security update check: no update found (next check in 24 hours)
npm install output:
> fibers#1.0.15 install /var/www/play/bundle/programs/server/node_modules/fibers
> node build.js || nodejs build.js
`linux-x64-48` exists; testing
Binary is fine; exiting
> meteor-dev-bundle#0.0.0 install /var/www/play/bundle/programs/server
> node npm-rebuild.js
{
"meteor-dev-bundle": "0.0.0",
"npm": "3.10.10",
"ares": "1.10.1-DEV",
"http_parser": "2.7.0",
"icu": "56.1",
"modules": "48",
"node": "6.9.5",
"openssl": "1.0.2k",
"uv": "1.9.1",
"v8": "5.1.281.89",
"zlib": "1.2.8"
}
meteor-dev-bundle#0.0.0 /var/www/play/bundle/programs/server
├── amdefine#1.0.1
├── asap#2.0.5
├── fibers#1.0.15
├── meteor-promise#0.8.0
├─┬ node-gyp#3.4.0
│ ├─┬ fstream#1.0.10
│ │ └── inherits#2.0.3
│ ├─┬ glob#7.1.1
│ │ ├── fs.realpath#1.0.0
│ │ ├─┬ inflight#1.0.6
│ │ │ └── wrappy#1.0.2
│ │ ├── once#1.4.0
│ │ └── path-is-absolute#1.0.1
│ ├── graceful-fs#4.1.11
│ ├─┬ minimatch#3.0.3
│ │ └─┬ brace-expansion#1.1.6
│ │ ├── balanced-match#0.4.2
│ │ └── concat-map#0.0.1
│ ├─┬ mkdirp#0.5.1
│ │ └── minimist#0.0.8
│ ├─┬ nopt#3.0.6
│ │ └── abbrev#1.0.9
│ ├─┬ npmlog#3.1.2
│ │ ├─┬ are-we-there-yet#1.1.2
│ │ │ ├── delegates#1.0.0
│ │ │ └── readable-stream#2.2.2
│ │ ├── console-control-strings#1.1.0
│ │ ├─┬ gauge#2.6.0
│ │ │ ├── aproba#1.1.0
│ │ │ ├── has-color#0.1.7
│ │ │ ├── has-unicode#2.0.1
│ │ │ ├── object-assign#4.1.1
│ │ │ ├── signal-exit#3.0.2
│ │ │ ├─┬ string-width#1.0.2
│ │ │ │ ├── code-point-at#1.1.0
│ │ │ │ └─┬ is-fullwidth-code-point#1.0.0
│ │ │ │ └── number-is-nan#1.0.1
│ │ │ ├─┬ strip-ansi#3.0.1
│ │ │ │ └── ansi-regex#2.1.1
│ │ │ └── wide-align#1.1.0
│ │ └── set-blocking#2.0.0
│ ├─┬ osenv#0.1.4
│ │ ├── os-homedir#1.0.2
│ │ └── os-tmpdir#1.0.2
│ ├─┬ path-array#1.0.1
│ │ └─┬ array-index#1.0.0
│ │ ├─┬ debug#2.6.0
│ │ │ └── ms#0.7.2
│ │ └─┬ es6-symbol#3.1.0
│ │ ├── d#0.1.1
│ │ └─┬ es5-ext#0.10.12
│ │ └── es6-iterator#2.0.0
│ ├─┬ request#2.79.0
│ │ ├── aws-sign2#0.6.0
│ │ ├── aws4#1.6.0
│ │ ├── caseless#0.11.0
│ │ ├─┬ combined-stream#1.0.5
│ │ │ └── delayed-stream#1.0.0
│ │ ├── extend#3.0.0
│ │ ├── forever-agent#0.6.1
│ │ ├─┬ form-data#2.1.2
│ │ │ └── asynckit#0.4.0
│ │ ├─┬ har-validator#2.0.6
│ │ │ ├─┬ chalk#1.1.3
│ │ │ │ ├── ansi-styles#2.2.1
│ │ │ │ ├── escape-string-regexp#1.0.5
│ │ │ │ ├── has-ansi#2.0.0
│ │ │ │ └── supports-color#2.0.0
│ │ │ ├─┬ commander#2.9.0
│ │ │ │ └── graceful-readlink#1.0.1
│ │ │ ├─┬ is-my-json-valid#2.15.0
│ │ │ │ ├── generate-function#2.0.0
│ │ │ │ ├─┬ generate-object-property#1.2.0
│ │ │ │ │ └── is-property#1.0.2
│ │ │ │ ├── jsonpointer#4.0.1
│ │ │ │ └── xtend#4.0.1
│ │ │ └─┬ pinkie-promise#2.0.1
│ │ │ └── pinkie#2.0.4
│ │ ├─┬ hawk#3.1.3
│ │ │ ├── boom#2.10.1
│ │ │ ├── cryptiles#2.0.5
│ │ │ ├── hoek#2.16.3
│ │ │ └── sntp#1.0.9
│ │ ├─┬ http-signature#1.1.1
│ │ │ ├── assert-plus#0.2.0
│ │ │ ├─┬ jsprim#1.3.1
│ │ │ │ ├── extsprintf#1.0.2
│ │ │ │ ├── json-schema#0.2.3
│ │ │ │ └── verror#1.3.6
│ │ │ └─┬ sshpk#1.10.2
│ │ │ ├── asn1#0.2.3
│ │ │ ├── assert-plus#1.0.0
│ │ │ ├── bcrypt-pbkdf#1.0.1
│ │ │ ├─┬ dashdash#1.14.1
│ │ │ │ └── assert-plus#1.0.0
│ │ │ ├── ecc-jsbn#0.1.1
│ │ │ ├─┬ getpass#0.1.6
│ │ │ │ └── assert-plus#1.0.0
│ │ │ ├── jodid25519#1.0.2
│ │ │ ├── jsbn#0.1.0
│ │ │ └── tweetnacl#0.14.5
│ │ ├── is-typedarray#1.0.0
│ │ ├── isstream#0.1.2
│ │ ├── json-stringify-safe#5.0.1
│ │ ├─┬ mime-types#2.1.14
│ │ │ └── mime-db#1.26.0
│ │ ├── oauth-sign#0.8.2
│ │ ├── qs#6.3.0
│ │ ├── stringstream#0.0.5
│ │ ├─┬ tough-cookie#2.3.2
│ │ │ └── punycode#1.4.1
│ │ ├── tunnel-agent#0.4.3
│ │ └── uuid#3.0.1
│ ├── rimraf#2.5.4
│ ├─┬ tar#2.2.1
│ │ └── block-stream#0.0.9
│ └─┬ which#1.2.12
│ └── isexe#1.1.2
├─┬ node-pre-gyp#0.6.29
│ ├─┬ rc#1.1.6
│ │ ├── deep-extend#0.4.1
│ │ ├── ini#1.3.4
│ │ ├── minimist#1.2.0
│ │ └── strip-json-comments#1.0.4
│ ├── semver#5.2.0
│ └─┬ tar-pack#3.1.4
│ ├─┬ debug#2.2.0
│ │ └── ms#0.7.1
│ ├── fstream-ignore#1.0.5
│ ├── once#1.3.3
│ ├─┬ readable-stream#2.1.5
│ │ ├── buffer-shims#1.0.0
│ │ ├── core-util-is#1.0.2
│ │ ├── isarray#1.0.0
│ │ ├── process-nextick-args#1.0.7
│ │ ├── string_decoder#0.10.31
│ │ └── util-deprecate#1.0.2
│ └── uid-number#0.0.6
├── promise#7.1.1
├── semver#4.1.0
├── source-map#0.1.32
├── source-map-support#0.3.2
└── underscore#1.5.2
npm WARN meteor-dev-bundle#0.0.0 No description
npm WARN meteor-dev-bundle#0.0.0 No repository field.
npm WARN meteor-dev-bundle#0.0.0 No license field.
According to the Meteor deployment guide, you have to use specifically Node 4.6.2.
Depending on the version of Meteor you are using, you should install
the proper version of node using the appropriate installation process
for your platform.
Node 4.6.2 for Meteor 1.4.x
Node 0.10.43 for Meteor 1.3.x and earlier
If you use a mismatched version of Node when deploying your
application, you will encounter errors!
Passenger docs also suggest a 4.x version of node.
It worked for me with node js v4.8.4. Now CPU rarely goes above 10%.
Fixed it by reinstalling everything from the scratch. Still don't know what happend.
It's happening again, approximately once per day:
Wonder if there is some alternative for Passenger + Nginx?
Node version as mentioned in above answers strictly matters. You can try installing nginx+ pm2. It works like charm. To know more about pm2 , I already answered here.
How to run built of Meteor's sample app via Node

Karma PhantomJs - TypeError on Linux and on Win 7 all tests succeed

I am running the commands
npm install karma karma-jasmine karma-phantomjs-launcher phantomjs#2.1.7 jasmine-core --save-dev
karma start
on my Linux CentOs 7.2 machine and get this error:
bower_components/angular/angular.js:4641:53
forEach#bower_components/angular/angular.js:321:24
loadModules#bower_components/angular/angular.js:4601:12
createInjector#bower_components/angular/angular.js:4523:30
workFn#vendor/angular-mocks.js:2427:60
TypeError: undefined is not an object (evaluating '$rootScope.$new') in my-components/my-specific-component/spec/mySpecificController.spec.js (line 84)
createController#my-components/my-specific-component/spec/mySpecificController.spec.js:84:37
my-components/my-specific-component/spec/mySpecificController.spec.js:92:42
(...10 more tests failing in the same spec...)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 54 of 54 (11 FAILED) (0.349 secs / 1.251 secs)
I run the exact same command on my Windows 7 machine and all tests complete successfully:
PhantomJS 2.1.1 (Windows 7 0.0.0): Executed 54 of 54 SUCCESS (0.152 secs / 1.102 secs)
I checked the versions of the installed npm:
Win 7 ---> npm 2.15.1
CentOs 7.2 ---> npm 3.10.3
Comment: Shouldn't be a showstopper, shouldn't it?
Installed modules in npm on Win 7:
myuser#mycomputer MINGW64 /c/Users/myuser/IdeaProjects/my_project/src/main/webapp (feature/some-feature)
$ npm ls --global
C:\Users\myuser\AppData\Roaming\npm
├── bower#1.7.9
└─┬ karma-cli#1.0.1
└── resolve#1.1.7
Installed npm modules in CentOs7:
[root#localhost webapp]# npm ls --global
/usr/lib
├── ansi#0.2.1
├── bower#1.7.9
├─┬ karma-cli#1.0.1
│ └── resolve#1.1.7
├─┬ npm#3.10.3
│ ├── abbrev#1.0.9 -> /usr/lib/node_modules/npm/node_modules.bundled/abbrev
│ ├── ansi-regex#2.0.0 -> /usr/lib/node_modules/npm/node_modules.bundled/ansi-regex
│ ├── ansicolors#0.3.2 -> /usr/lib/node_modules/npm/node_modules.bundled/ansicolors
│ ├── ansistyles#0.1.3 -> /usr/lib/node_modules/npm/node_modules.bundled/ansistyles
│ ├── aproba#1.0.4 -> /usr/lib/node_modules/npm/node_modules.bundled/aproba
│ ├── archy#1.0.0 -> /usr/lib/node_modules/npm/node_modules.bundled/archy
│ ├── asap#2.0.4 -> /usr/lib/node_modules/npm/node_modules.bundled/asap
│ ├── chownr#1.0.1 -> /usr/lib/node_modules/npm/node_modules.bundled/chownr
│ ├── cmd-shim#2.0.2 -> /usr/lib/node_modules/npm/node_modules.bundled/cmd-shim
│ ├─┬ columnify#1.5.4 -> /usr/lib/node_modules/npm/node_modules.bundled/columnify
│ │ └─┬ wcwidth#1.0.0
│ │ └─┬ defaults#1.0.3
│ │ └── clone#1.0.2
│ ├─┬ config-chain#1.1.10 -> /usr/lib/node_modules/npm/node_modules.bundled/config-chain
│ │ └── proto-list#1.2.4
│ ├── debuglog#1.0.1 -> /usr/lib/node_modules/npm/node_modules.bundled/debuglog
│ ├── dezalgo#1.0.3 -> /usr/lib/node_modules/npm/node_modules.bundled/dezalgo
│ ├── editor#1.0.0 -> /usr/lib/node_modules/npm/node_modules.bundled/editor
│ ├── fs-vacuum#1.2.9 -> /usr/lib/node_modules/npm/node_modules.bundled/fs-vacuum
│ ├── fs-write-stream-atomic#1.0.8 -> /usr/lib/node_modules/npm/node_modules.bundled/fs-write-stream-atomic
│ ├── fstream#1.0.10 -> /usr/lib/node_modules/npm/node_modules.bundled/fstream
│ ├─┬ fstream-npm#1.1.0 -> /usr/lib/node_modules/npm/node_modules.bundled/fstream-npm
│ │ └─┬ fstream-ignore#1.0.5
│ │ └─┬ minimatch#3.0.0
│ │ └─┬ brace-expansion#1.1.4
│ │ ├── balanced-match#0.4.1
│ │ └── concat-map#0.0.1
│ ├─┬ glob#7.0.4 -> /usr/lib/node_modules/npm/node_modules.bundled/glob
│ │ ├── fs.realpath#1.0.0
│ │ ├─┬ minimatch#3.0.0
│ │ │ └─┬ brace-expansion#1.1.5
│ │ │ ├── balanced-match#0.4.1
│ │ │ └── concat-map#0.0.1
│ │ └── path-is-absolute#1.0.0
│ ├── graceful-fs#4.1.4 -> /usr/lib/node_modules/npm/node_modules.bundled/graceful-fs
│ ├── has-unicode#2.0.1 -> /usr/lib/node_modules/npm/node_modules.bundled/has-unicode
│ ├── hosted-git-info#2.1.5 -> /usr/lib/node_modules/npm/node_modules.bundled/hosted-git-info
│ ├── iferr#0.1.5 -> /usr/lib/node_modules/npm/node_modules.bundled/iferr
│ ├── imurmurhash#0.1.4 -> /usr/lib/node_modules/npm/node_modules.bundled/imurmurhash
│ ├── inflight#1.0.5 -> /usr/lib/node_modules/npm/node_modules.bundled/inflight
│ ├── inherits#2.0.1 -> /usr/lib/node_modules/npm/node_modules.bundled/inherits
│ ├── ini#1.3.4 -> /usr/lib/node_modules/npm/node_modules.bundled/ini
│ ├─┬ init-package-json#1.9.4 -> /usr/lib/node_modules/npm/node_modules.bundled/init-package-json
│ │ ├─┬ glob#6.0.4
│ │ │ ├─┬ minimatch#3.0.0
│ │ │ │ └─┬ brace-expansion#1.1.4
│ │ │ │ ├── balanced-match#0.4.1
│ │ │ │ └── concat-map#0.0.1
│ │ │ └── path-is-absolute#1.0.0
│ │ └── promzard#0.3.0
│ ├── lockfile#1.0.1 -> /usr/lib/node_modules/npm/node_modules.bundled/lockfile
│ ├── lodash._baseindexof#3.1.0 -> /usr/lib/node_modules/npm/node_modules.bundled/lodash._baseindexof
│ ├─┬ lodash._baseuniq#4.6.0 -> /usr/lib/node_modules/npm/node_modules.bundled/lodash._baseuniq
│ │ ├── lodash._createset#4.0.3
│ │ └── lodash._root#3.0.1
│ ├── lodash._bindcallback#3.0.1 -> /usr/lib/node_modules/npm/node_modules.bundled/lodash._bindcallback
│ ├── lodash._cacheindexof#3.0.2 -> /usr/lib/node_modules/npm/node_modules.bundled/lodash._cacheindexof
│ ├── lodash._createcache#3.1.2 -> /usr/lib/node_modules/npm/node_modules.bundled/lodash._createcache
│ ├── lodash._getnative#3.9.1 -> /usr/lib/node_modules/npm/node_modules.bundled/lodash._getnative
│ ├─┬ lodash.clonedeep#4.3.2 -> /usr/lib/node_modules/npm/node_modules.bundled/lodash.clonedeep
│ │ └── lodash._baseclone#4.5.3
│ ├── lodash.restparam#3.6.1 -> /usr/lib/node_modules/npm/node_modules.bundled/lodash.restparam
│ ├─┬ lodash.union#4.4.0 -> /usr/lib/node_modules/npm/node_modules.bundled/lodash.union
│ │ ├── lodash._baseflatten#4.2.1
│ │ └── lodash.rest#4.0.3
│ ├── lodash.uniq#4.3.0 -> /usr/lib/node_modules/npm/node_modules.bundled/lodash.uniq
│ ├─┬ lodash.without#4.2.0 -> /usr/lib/node_modules/npm/node_modules.bundled/lodash.without
│ │ ├─┬ lodash._basedifference#4.5.0
│ │ │ └── lodash._root#3.0.1
│ │ └── lodash.rest#4.0.3
│ ├─┬ mkdirp#0.5.1 -> /usr/lib/node_modules/npm/node_modules.bundled/mkdirp
│ │ └── minimist#0.0.8
│ ├─┬ node-gyp#3.3.1 -> /usr/lib/node_modules/npm/node_modules.bundled/node-gyp
│ │ ├─┬ glob#4.5.3
│ │ │ └─┬ minimatch#2.0.10
│ │ │ └─┬ brace-expansion#1.1.3
│ │ │ ├── balanced-match#0.3.0
│ │ │ └── concat-map#0.0.1
│ │ ├─┬ minimatch#1.0.0
│ │ │ ├── lru-cache#2.7.3
│ │ │ └── sigmund#1.0.1
│ │ ├─┬ npmlog#2.0.4
│ │ │ ├── ansi#0.3.1
│ │ │ ├─┬ are-we-there-yet#1.1.2
│ │ │ │ └── delegates#1.0.0
│ │ │ └─┬ gauge#1.2.7
│ │ │ ├─┬ lodash.pad#4.4.0
│ │ │ │ ├── lodash._baseslice#4.0.0
│ │ │ │ ├── lodash._basetostring#4.12.0
│ │ │ │ └── lodash.tostring#4.1.3
│ │ │ ├─┬ lodash.padend#4.5.0
│ │ │ │ ├── lodash._baseslice#4.0.0
│ │ │ │ ├── lodash._basetostring#4.12.0
│ │ │ │ └── lodash.tostring#4.1.3
│ │ │ └─┬ lodash.padstart#4.5.0
│ │ │ ├── lodash._baseslice#4.0.0
│ │ │ ├── lodash._basetostring#4.12.0
│ │ │ └── lodash.tostring#4.1.3
│ │ └─┬ path-array#1.0.1
│ │ └─┬ array-index#1.0.0
│ │ ├─┬ debug#2.2.0
│ │ │ └── ms#0.7.1
│ │ └─┬ es6-symbol#3.0.2
│ │ ├── d#0.1.1
│ │ └─┬ es5-ext#0.10.11
│ │ └── es6-iterator#2.0.0
│ ├── nopt#3.0.6 -> /usr/lib/node_modules/npm/node_modules.bundled/nopt
│ ├── normalize-git-url#3.0.2 -> /usr/lib/node_modules/npm/node_modules.bundled/normalize-git-url
│ ├─┬ normalize-package-data#2.3.5 -> /usr/lib/node_modules/npm/node_modules.bundled/normalize-package-data
│ │ └─┬ is-builtin-module#1.0.0
│ │ └── builtin-modules#1.1.1
│ ├── npm-cache-filename#1.0.2 -> /usr/lib/node_modules/npm/node_modules.bundled/npm-cache-filename
│ ├── npm-install-checks#3.0.0 -> /usr/lib/node_modules/npm/node_modules.bundled/npm-install-checks
│ ├── npm-package-arg#4.2.0 -> /usr/lib/node_modules/npm/node_modules.bundled/npm-package-arg
│ ├─┬ npm-registry-client#7.1.2 -> /usr/lib/node_modules/npm/node_modules.bundled/npm-registry-client
│ │ ├─┬ concat-stream#1.5.1
│ │ │ ├─┬ readable-stream#2.0.6
│ │ │ │ ├── core-util-is#1.0.2
│ │ │ │ ├── isarray#1.0.0
│ │ │ │ ├── process-nextick-args#1.0.7
│ │ │ │ ├── string_decoder#0.10.31
│ │ │ │ └── util-deprecate#1.0.2
│ │ │ └── typedarray#0.0.6
│ │ └── retry#0.8.0
│ ├── npm-user-validate#0.1.4 -> /usr/lib/node_modules/npm/node_modules.bundled/npm-user-validate
│ ├─┬ npmlog#3.1.2 -> /usr/lib/node_modules/npm/node_modules.bundled/npmlog
│ │ ├─┬ are-we-there-yet#1.1.2
│ │ │ └── delegates#1.0.0
│ │ ├── console-control-strings#1.1.0
│ │ ├─┬ gauge#2.6.0
│ │ │ ├── has-color#0.1.7
│ │ │ ├── object-assign#4.1.0
│ │ │ ├── signal-exit#3.0.0
│ │ │ ├─┬ string-width#1.0.1
│ │ │ │ ├─┬ code-point-at#1.0.0
│ │ │ │ │ └── number-is-nan#1.0.0
│ │ │ │ └─┬ is-fullwidth-code-point#1.0.0
│ │ │ │ └── number-is-nan#1.0.0
│ │ │ └── wide-align#1.1.0
│ │ └── set-blocking#2.0.0
│ ├── once#1.3.3 -> /usr/lib/node_modules/npm/node_modules.bundled/once
│ ├── opener#1.4.1 -> /usr/lib/node_modules/npm/node_modules.bundled/opener
│ ├─┬ osenv#0.1.3 -> /usr/lib/node_modules/npm/node_modules.bundled/osenv
│ │ ├── os-homedir#1.0.1
│ │ └── os-tmpdir#1.0.1
│ ├── path-is-inside#1.0.1 -> /usr/lib/node_modules/npm/node_modules.bundled/path-is-inside
│ ├─┬ read#1.0.7 -> /usr/lib/node_modules/npm/node_modules.bundled/read
│ │ └── mute-stream#0.0.5
│ ├── read-cmd-shim#1.0.1 -> /usr/lib/node_modules/npm/node_modules.bundled/read-cmd-shim
│ ├─┬ read-installed#4.0.3 -> /usr/lib/node_modules/npm/node_modules.bundled/read-installed
│ │ └── util-extend#1.0.3
│ ├─┬ read-package-json#2.0.4 -> /usr/lib/node_modules/npm/node_modules.bundled/read-package-json
│ │ ├─┬ glob#6.0.4
│ │ │ ├─┬ minimatch#3.0.0
│ │ │ │ └─┬ brace-expansion#1.1.3
│ │ │ │ ├── balanced-match#0.3.0
│ │ │ │ └── concat-map#0.0.1
│ │ │ └── path-is-absolute#1.0.0
│ │ └─┬ json-parse-helpfulerror#1.0.3
│ │ └── jju#1.3.0
│ ├── read-package-tree#5.1.5 -> /usr/lib/node_modules/npm/node_modules.bundled/read-package-tree
│ ├─┬ readable-stream#2.1.4 -> /usr/lib/node_modules/npm/node_modules.bundled/readable-stream
│ │ ├── buffer-shims#1.0.0
│ │ ├── core-util-is#1.0.2
│ │ ├── isarray#1.0.0
│ │ ├── process-nextick-args#1.0.7
│ │ ├── string_decoder#0.10.31
│ │ └── util-deprecate#1.0.2
│ ├── readdir-scoped-modules#1.0.2 -> /usr/lib/node_modules/npm/node_modules.bundled/readdir-scoped-modules
│ ├── realize-package-specifier#3.0.3 -> /usr/lib/node_modules/npm/node_modules.bundled/realize-package-specifier
│ ├─┬ request#2.72.0 -> /usr/lib/node_modules/npm/node_modules.bundled/request
│ │ ├── aws-sign2#0.6.0
│ │ ├─┬ aws4#1.3.2
│ │ │ └─┬ lru-cache#4.0.1
│ │ │ ├── pseudomap#1.0.2
│ │ │ └── yallist#2.0.0
│ │ ├─┬ bl#1.1.2
│ │ │ └─┬ readable-stream#2.0.6
│ │ │ ├── core-util-is#1.0.2
│ │ │ ├── isarray#1.0.0
│ │ │ ├── process-nextick-args#1.0.6
│ │ │ ├── string_decoder#0.10.31
│ │ │ └── util-deprecate#1.0.2
│ │ ├── caseless#0.11.0
│ │ ├─┬ combined-stream#1.0.5
│ │ │ └── delayed-stream#1.0.0
│ │ ├── extend#3.0.0
│ │ ├── forever-agent#0.6.1
│ │ ├─┬ form-data#1.0.0-rc4
│ │ │ └── async#1.5.2
│ │ ├─┬ har-validator#2.0.6
│ │ │ ├─┬ chalk#1.1.3
│ │ │ │ ├── ansi-styles#2.2.1
│ │ │ │ ├── escape-string-regexp#1.0.5
│ │ │ │ ├── has-ansi#2.0.0
│ │ │ │ └── supports-color#2.0.0
│ │ │ ├─┬ commander#2.9.0
│ │ │ │ └── graceful-readlink#1.0.1
│ │ │ ├─┬ is-my-json-valid#2.13.1
│ │ │ │ ├── generate-function#2.0.0
│ │ │ │ ├─┬ generate-object-property#1.2.0
│ │ │ │ │ └── is-property#1.0.2
│ │ │ │ ├── jsonpointer#2.0.0
│ │ │ │ └── xtend#4.0.1
│ │ │ └─┬ pinkie-promise#2.0.1
│ │ │ └── pinkie#2.0.4
│ │ ├─┬ hawk#3.1.3
│ │ │ ├── boom#2.10.1
│ │ │ ├── cryptiles#2.0.5
│ │ │ ├── hoek#2.16.3
│ │ │ └── sntp#1.0.9
│ │ ├─┬ http-signature#1.1.1
│ │ │ ├── assert-plus#0.2.0
│ │ │ ├─┬ jsprim#1.2.2
│ │ │ │ ├── extsprintf#1.0.2
│ │ │ │ ├── json-schema#0.2.2
│ │ │ │ └── verror#1.3.6
│ │ │ └─┬ sshpk#1.7.4
│ │ │ ├── asn1#0.2.3
│ │ │ ├─┬ dashdash#1.13.0
│ │ │ │ └── assert-plus#1.0.0
│ │ │ ├── ecc-jsbn#0.1.1
│ │ │ ├── jodid25519#1.0.2
│ │ │ ├── jsbn#0.1.0
│ │ │ └── tweetnacl#0.14.3
│ │ ├── is-typedarray#1.0.0
│ │ ├── isstream#0.1.2
│ │ ├── json-stringify-safe#5.0.1
│ │ ├─┬ mime-types#2.1.10
│ │ │ └── mime-db#1.22.0
│ │ ├── node-uuid#1.4.7
│ │ ├── oauth-sign#0.8.1
│ │ ├── qs#6.1.0
│ │ ├── stringstream#0.0.5
│ │ ├── tough-cookie#2.2.2
│ │ └── tunnel-agent#0.4.2
│ ├── retry#0.9.0 -> /usr/lib/node_modules/npm/node_modules.bundled/retry
│ ├── rimraf#2.5.2 -> /usr/lib/node_modules/npm/node_modules.bundled/rimraf
│ ├── semver#5.1.0 -> /usr/lib/node_modules/npm/node_modules.bundled/semver
│ ├── sha#2.0.1 -> /usr/lib/node_modules/npm/node_modules.bundled/sha
│ ├── slide#1.1.6 -> /usr/lib/node_modules/npm/node_modules.bundled/slide
│ ├── sorted-object#2.0.0 -> /usr/lib/node_modules/npm/node_modules.bundled/sorted-object
│ ├── strip-ansi#3.0.1 -> /usr/lib/node_modules/npm/node_modules.bundled/strip-ansi
│ ├─┬ tar#2.2.1 -> /usr/lib/node_modules/npm/node_modules.bundled/tar
│ │ └── block-stream#0.0.8
│ ├── text-table#0.2.0 -> /usr/lib/node_modules/npm/node_modules.bundled/text-table
│ ├── uid-number#0.0.6 -> /usr/lib/node_modules/npm/node_modules.bundled/uid-number
│ ├── umask#1.1.0 -> /usr/lib/node_modules/npm/node_modules.bundled/umask
│ ├─┬ unique-filename#1.1.0 -> /usr/lib/node_modules/npm/node_modules.bundled/unique-filename
│ │ └── unique-slug#2.0.0
│ ├── unpipe#1.0.0 -> /usr/lib/node_modules/npm/node_modules.bundled/unpipe
│ ├─┬ validate-npm-package-license#3.0.1 -> /usr/lib/node_modules/npm/node_modules.bundled/validate-npm-package-license
│ │ ├─┬ spdx-correct#1.0.2
│ │ │ └── spdx-license-ids#1.2.0
│ │ └─┬ spdx-expression-parse#1.0.2
│ │ ├── spdx-exceptions#1.0.4
│ │ └── spdx-license-ids#1.2.0
│ ├─┬ validate-npm-package-name#2.2.2 -> /usr/lib/node_modules/npm/node_modules.bundled/validate-npm-package-name
│ │ └── builtins#0.0.7
│ ├─┬ which#1.2.10 -> /usr/lib/node_modules/npm/node_modules.bundled/which
│ │ └── isexe#1.1.2
│ ├── wrappy#1.0.2 -> /usr/lib/node_modules/npm/node_modules.bundled/wrappy
│ └── write-file-atomic#1.1.4 -> /usr/lib/node_modules/npm/node_modules.bundled/write-file-atomic
└── which#1.0.5
Why do the Specs behave differently on the two platforms?
I am using grunt (with yeoman), and I added bower components via this command:
bower install `package_name` --save
This will add them into the index.html and karma.conf.js automatically. But there is a component named adm-dtp which was not added automatically (even when I used above command). I add this manually to karma.conf.js and everything works.
So the generic answer should be check karma.conf.js and be sure that everything is loaded correctly. this link is related. And if you use grunt and yeoman add them after //end bower, because that part will be overwritten after running grunt test.
karma.conf.js:
config.set({
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// base path, that will be used to resolve files and exclude
basePath: '../',
// testing framework to use (jasmine/mocha/qunit/...)
// as well as any additional frameworks (requirejs/chai/sinon/...)
frameworks: [
'jasmine'
],
// list of files / patterns to load in the browser
files: [
'app/scripts/persian.min.js',
// bower:js
'bower_components/jquery/dist/jquery.js',
'bower_components/angular/angular.js',
'bower_components/bootstrap/dist/js/bootstrap.js',
'bower_components/angular-animate/angular-animate.js',
'bower_components/angular-aria/angular-aria.js',
'bower_components/angular-cookies/angular-cookies.js',
'bower_components/angular-messages/angular-messages.js',
'bower_components/angular-resource/angular-resource.js',
'bower_components/angular-route/angular-route.js',
'bower_components/angular-sanitize/angular-sanitize.js',
'bower_components/angular-touch/angular-touch.js',
'bower_components/angularLocalStorage/dist/angularLocalStorage.min.js',
'bower_components/ngmap/build/scripts/ng-map.js',
'bower_components/angular-loading-bar/build/loading-bar.js',
'bower_components/angular-persian/dist/angularpersian.js',
'bower_components/caman/dist/caman.min.js',
'bower_components/caman/dist/caman.full.min.js',
'bower_components/angular-xeditable/dist/js/xeditable.js',
'bower_components/moment/moment.js',
'bower_components/angular-mocks/angular-mocks.js',
// endbower
// AFTER END BOWER ADDING BOWER COMPONENTS NOT ADDED AUTOMATICLY:
'bower_components/adm-dtp/dist/ADM-dateTimePicker.min.js',
'app/scripts/**/*.js',
'test/mock/**/*.js',
'test/spec/**/*.js',
'app/scripts/controllers/bootstrapController.js'
],
// list of files / patterns to exclude
exclude: [
],
// web server port
port: 8082,
// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
browsers: [
'PhantomJS',
],
// Which plugins to enable
plugins: [
'karma-phantomjs-launcher',
'karma-jasmine'
],
// Continuous Integration mode
// if true, it capture browsers, run tests and exit
singleRun: false,
colors: true,
// level of logging
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
logLevel: config.LOG_DISABLE,
// Uncomment the following lines if you are using grunt's server to run the tests
proxies: {
'/': 'http://localhost:9000/'
},
// URL root prevent conflicts with the site root
// urlRoot: '_karma_'
});

Node how to make dependency analysis and remove unused module dependecies

My node modules is a simple module that have few dependencies and makes use mostly of built-in modules.
Given that, my module has a dependency of a module that declares those dependencies
"dependencies": {
"events": "^1.1.1",
"geocoder": "^0.2.2",
"gpsoauthnode": "^0.0.5",
"istanbul": "^0.4.4",
"protobufjs": "^5.0.1",
"request": "^2.73.0",
"s2geometry-node": "^1.3.0",
"tape": "^4.6.0"
}
Running npm install will end up in the following node_submodules tree
├─┬ body-parser#1.15.2
│ ├── bytes#2.4.0
│ ├── content-type#1.0.2
│ ├─┬ debug#2.2.0
│ │ └── ms#0.7.1
│ ├── depd#1.1.0
│ ├─┬ http-errors#1.5.0
│ │ ├── inherits#2.0.1
│ │ ├── setprototypeof#1.0.1
│ │ └── statuses#1.3.0
│ ├── iconv-lite#0.4.13
│ ├─┬ on-finished#2.3.0
│ │ └── ee-first#1.1.1
│ ├── qs#6.2.0
│ ├─┬ raw-body#2.1.7
│ │ └── unpipe#1.0.0
│ └─┬ type-is#1.6.13
│ └── media-typer#0.3.0
├─┬ express#4.14.0
│ ├─┬ accepts#1.3.3
│ │ └── negotiator#0.6.1
│ ├── array-flatten#1.1.1
│ ├── content-disposition#0.5.1
│ ├── cookie#0.3.1
│ ├── cookie-signature#1.0.6
│ ├── encodeurl#1.0.1
│ ├── escape-html#1.0.3
│ ├── etag#1.7.0
│ ├── finalhandler#0.5.0
│ ├── fresh#0.3.0
│ ├── merge-descriptors#1.0.1
│ ├── methods#1.1.2
│ ├── parseurl#1.3.1
│ ├── path-to-regexp#0.1.7
│ ├─┬ proxy-addr#1.1.2
│ │ ├── forwarded#0.1.0
│ │ └── ipaddr.js#1.1.1
│ ├── range-parser#1.2.0
│ ├─┬ send#0.14.1
│ │ ├── destroy#1.0.4
│ │ └── mime#1.3.4
│ ├── serve-static#1.11.1
│ ├── utils-merge#1.0.0
│ └── vary#1.1.0
├─┬ pokemon-go-node-api#1.3.1
│ ├── events#1.1.1
│ ├─┬ geocoder#0.2.2
│ │ ├─┬ request#2.11.1
│ │ │ ├─┬ form-data#0.0.3
│ │ │ │ ├── async#0.1.9
│ │ │ │ └─┬ combined-stream#0.0.3
│ │ │ │ └── delayed-stream#0.0.5
│ │ │ └── mime#1.2.7
│ │ ├── underscore#1.3.3
│ │ └─┬ xml2js#0.2.0
│ │ └── sax#1.2.1
│ ├─┬ gpsoauthnode#0.0.5
│ │ └── crypto-js#3.1.6
│ ├─┬ istanbul#0.4.4
│ │ ├── abbrev#1.0.9
│ │ ├── async#1.5.2
│ │ ├─┬ escodegen#1.8.0
│ │ │ ├── estraverse#1.9.3
│ │ │ ├── esutils#2.0.2
│ │ │ ├─┬ optionator#0.8.1
│ │ │ │ ├── deep-is#0.1.3
│ │ │ │ ├── fast-levenshtein#1.1.4
│ │ │ │ ├── levn#0.3.0
│ │ │ │ ├── prelude-ls#1.1.2
│ │ │ │ └── type-check#0.3.2
│ │ │ └─┬ source-map#0.2.0
│ │ │ └── amdefine#1.0.0
│ │ ├── esprima#2.7.2
│ │ ├─┬ fileset#0.2.1
│ │ │ └─┬ minimatch#2.0.10
│ │ │ └─┬ brace-expansion#1.1.6
│ │ │ ├── balanced-match#0.4.2
│ │ │ └── concat-map#0.0.1
│ │ ├─┬ handlebars#4.0.5
│ │ │ ├─┬ optimist#0.6.1
│ │ │ │ ├── minimist#0.0.10
│ │ │ │ └── wordwrap#0.0.3
│ │ │ ├── source-map#0.4.4
│ │ │ └─┬ uglify-js#2.7.0
│ │ │ ├── async#0.2.10
│ │ │ ├── source-map#0.5.6
│ │ │ └── uglify-to-browserify#1.0.2
│ │ ├─┬ js-yaml#3.6.1
│ │ │ └─┬ argparse#1.0.7
│ │ │ └── sprintf-js#1.0.3
│ │ ├─┬ mkdirp#0.5.1
│ │ │ └── minimist#0.0.8
│ │ ├── nopt#3.0.6
│ │ ├─┬ once#1.3.3
│ │ │ └── wrappy#1.0.2
│ │ ├── resolve#1.1.7
│ │ ├─┬ supports-color#3.1.2
│ │ │ └── has-flag#1.0.0
│ │ ├─┬ which#1.2.10
│ │ │ └── isexe#1.1.2
│ │ └── wordwrap#1.0.0
│ ├─┬ protobufjs#5.0.1
│ │ ├─┬ ascli#1.0.0
│ │ │ ├── colour#0.7.1
│ │ │ └── optjs#3.2.2
│ │ ├─┬ bytebuffer#5.0.1
│ │ │ └── long#3.2.0
│ │ ├─┬ glob#5.0.15
│ │ │ ├── inflight#1.0.5
│ │ │ └── path-is-absolute#1.0.0
│ │ └─┬ yargs#3.10.0
│ │ ├── camelcase#1.2.1
│ │ ├─┬ cliui#2.1.0
│ │ │ ├─┬ center-align#0.1.3
│ │ │ │ ├─┬ align-text#0.1.4
│ │ │ │ │ ├─┬ kind-of#3.0.3
│ │ │ │ │ │ └── is-buffer#1.1.3
│ │ │ │ │ ├── longest#1.0.1
│ │ │ │ │ └── repeat-string#1.5.4
│ │ │ │ └── lazy-cache#1.0.4
│ │ │ ├── right-align#0.1.3
│ │ │ └── wordwrap#0.0.2
│ │ ├── decamelize#1.2.0
│ │ └── window-size#0.1.0
│ ├─┬ s2geometry-node#1.3.1
│ │ └── bindings#1.2.1
│ └─┬ tape#4.6.0
│ ├── deep-equal#1.0.1
│ ├── defined#1.0.0
│ ├── function-bind#1.1.0
│ ├─┬ glob#7.0.5
│ │ ├── fs.realpath#1.0.0
│ │ └── minimatch#3.0.2
│ ├── has#1.0.1
│ ├── minimist#1.2.0
│ ├── object-inspect#1.2.1
│ ├── resumer#0.0.0
│ ├─┬ string.prototype.trim#1.1.2
│ │ ├─┬ define-properties#1.1.2
│ │ │ ├── foreach#2.0.5
│ │ │ └── object-keys#1.0.11
│ │ └─┬ es-abstract#1.5.1
│ │ ├─┬ es-to-primitive#1.1.1
│ │ │ ├── is-date-object#1.0.1
│ │ │ └── is-symbol#1.0.1
│ │ ├── is-callable#1.1.3
│ │ └── is-regex#1.0.3
│ └── through#2.3.8
├─┬ request#2.74.0
│ ├── aws-sign2#0.6.0
│ ├── aws4#1.4.1
│ ├─┬ bl#1.1.2
│ │ └─┬ readable-stream#2.0.6
│ │ ├── core-util-is#1.0.2
│ │ ├── isarray#1.0.0
│ │ ├── process-nextick-args#1.0.7
│ │ ├── string_decoder#0.10.31
│ │ └── util-deprecate#1.0.2
│ ├── caseless#0.11.0
│ ├─┬ combined-stream#1.0.5
│ │ └── delayed-stream#1.0.0
│ ├── extend#3.0.0
│ ├── forever-agent#0.6.1
│ ├── form-data#1.0.0-rc4
│ ├─┬ har-validator#2.0.6
│ │ ├─┬ chalk#1.1.3
│ │ │ ├── ansi-styles#2.2.1
│ │ │ ├── escape-string-regexp#1.0.5
│ │ │ ├─┬ has-ansi#2.0.0
│ │ │ │ └── ansi-regex#2.0.0
│ │ │ ├── strip-ansi#3.0.1
│ │ │ └── supports-color#2.0.0
│ │ ├─┬ commander#2.9.0
│ │ │ └── graceful-readlink#1.0.1
│ │ ├─┬ is-my-json-valid#2.13.1
│ │ │ ├── generate-function#2.0.0
│ │ │ ├─┬ generate-object-property#1.2.0
│ │ │ │ └── is-property#1.0.2
│ │ │ ├── jsonpointer#2.0.0
│ │ │ └── xtend#4.0.1
│ │ └─┬ pinkie-promise#2.0.1
│ │ └── pinkie#2.0.4
│ ├─┬ hawk#3.1.3
│ │ ├── boom#2.10.1
│ │ ├── cryptiles#2.0.5
│ │ ├── hoek#2.16.3
│ │ └── sntp#1.0.9
│ ├─┬ http-signature#1.1.1
│ │ ├── assert-plus#0.2.0
│ │ ├─┬ jsprim#1.3.0
│ │ │ ├── extsprintf#1.0.2
│ │ │ ├── json-schema#0.2.2
│ │ │ └── verror#1.3.6
│ │ └─┬ sshpk#1.8.3
│ │ ├── asn1#0.2.3
│ │ ├── assert-plus#1.0.0
│ │ ├─┬ dashdash#1.14.0
│ │ │ └── assert-plus#1.0.0
│ │ ├── ecc-jsbn#0.1.1
│ │ ├─┬ getpass#0.1.6
│ │ │ └── assert-plus#1.0.0
│ │ ├── jodid25519#1.0.2
│ │ ├── jsbn#0.1.0
│ │ └── tweetnacl#0.13.3
│ ├── is-typedarray#1.0.0
│ ├── isstream#0.1.2
│ ├── json-stringify-safe#5.0.1
│ ├─┬ mime-types#2.1.11
│ │ └── mime-db#1.23.0
│ ├── node-uuid#1.4.7
│ ├── oauth-sign#0.8.2
│ ├── stringstream#0.0.5
│ ├── tough-cookie#2.3.0
│ └── tunnel-agent#0.4.3
└─┬ tough-cookie-filestore#0.0.1
└─┬ tough-cookie#0.12.1
└── punycode#2.0.0
that is nothing less than
node_modules admin$ du -d0 -h
40M .
40Meg, what? At first look I was a bit surprised of that, since the list of dependencies seems to be too much. I would expect something like that from the Makefile of low level C library like Boost, libcrypto, libxml, libssl or whatever C/C++ library used by an OS, but, hey wait a moment, this is just a simple application using built-in library and just one external dependency. So, what's going on here?
Being serious, my question is: is there a way to make a static analysis of node packages installed via npm? And then to prune unused dependencies?
For sure, my module will not use at runtime most of the function declarations in the private scope of each of those modules, defined in this tree.

The provided URI "https://mystorageaccountname.blob.core.windows.net/" is invalid

I have some problems writing some files (from debian with the azure cli client) to my storage account. The following error is which i am receiving:
root#w01:/scripts# azure storage blob upload -a "mystorageaccountname" -k "Hewaebaweb0F2+E6qbSQbeabewabpr/3ZhKbdawbwabsRINSyQerIA==" "w01-20140213.tar.gz" "backup" "w01-20140213.tar.gz"
info: Executing command storage blob upload
error: The provided URI "https://mystorageaccountname.blob.core.windows.net/" is invalid.
info: Error information has been recorded to azure.err
error: storage blob upload command failed
I just updated my node packages on the machine to the latest version (npm update -g). This brings me to the following packages:
ro
root#w01:/scripts# npm -g list
/usr/local/lib
├─┬ azure#0.8.1
│ ├─┬ azure-common#0.9.1-pre.2
│ │ ├── dateformat#1.0.2-1.2.3
│ │ ├── duplexer#0.1.1
│ │ ├── envconf#0.0.4
│ │ ├─┬ request#2.27.0
│ │ │ ├── aws-sign#0.3.0
│ │ │ ├── cookie-jar#0.3.0
│ │ │ ├── forever-agent#0.5.2
│ │ │ ├─┬ form-data#0.1.2
│ │ │ │ ├── async#0.2.10
│ │ │ │ └─┬ combined-stream#0.0.4
│ │ │ │ └── delayed-stream#0.0.5
│ │ │ ├─┬ hawk#1.0.0
│ │ │ │ ├── boom#0.4.2
│ │ │ │ ├── cryptiles#0.2.2
│ │ │ │ ├── hoek#0.9.1
│ │ │ │ └── sntp#0.2.4
│ │ │ ├─┬ http-signature#0.10.0
│ │ │ │ ├── asn1#0.1.11
│ │ │ │ ├── assert-plus#0.1.2
│ │ │ │ └── ctype#0.5.2
│ │ │ ├── json-stringify-safe#5.0.0
│ │ │ ├── mime#1.2.11
│ │ │ ├── node-uuid#1.4.1
│ │ │ ├── oauth-sign#0.3.0
│ │ │ ├── qs#0.6.6
│ │ │ └── tunnel-agent#0.3.0
│ │ ├── through#2.3.4
│ │ ├── tunnel#0.0.3
│ │ ├── underscore#1.4.4
│ │ ├── validator#3.1.0
│ │ ├─┬ xml2js#0.2.7
│ │ │ └── sax#0.5.2
│ │ └── xmlbuilder#0.4.3
│ ├── azure-mgmt#0.9.1-pre.2
│ ├── azure-mgmt-compute#0.9.1-pre.2
│ ├─┬ azure-mgmt-sb#0.9.1-pre.2
│ │ └── underscore#1.6.0
│ ├─┬ azure-mgmt-sql#0.9.1-pre.2
│ │ └── underscore#1.6.0
│ ├── azure-mgmt-storage#0.9.1-pre.2
│ ├── azure-mgmt-vnet#0.9.1-pre.2
│ ├─┬ azure-mgmt-website#0.9.1-pre.2
│ │ └── underscore#1.6.0
│ ├── mime#1.2.11
│ ├── mpns#2.0.1
│ ├── node-uuid#1.2.0
│ ├─┬ request#2.27.0
│ │ ├── aws-sign#0.3.0
│ │ ├── cookie-jar#0.3.0
│ │ ├── forever-agent#0.5.2
│ │ ├─┬ form-data#0.1.2
│ │ │ ├── async#0.2.10
│ │ │ └─┬ combined-stream#0.0.4
│ │ │ └── delayed-stream#0.0.5
│ │ ├─┬ hawk#1.0.0
│ │ │ ├── boom#0.4.2
│ │ │ ├── cryptiles#0.2.2
│ │ │ ├── hoek#0.9.1
│ │ │ └── sntp#0.2.4
│ │ ├─┬ http-signature#0.10.0
│ │ │ ├── asn1#0.1.11
│ │ │ ├── assert-plus#0.1.2
│ │ │ └── ctype#0.5.2
│ │ ├── json-stringify-safe#5.0.0
│ │ ├── mime#1.2.11
│ │ ├── node-uuid#1.4.1
│ │ ├── oauth-sign#0.3.0
│ │ ├── qs#0.6.6
│ │ └── tunnel-agent#0.3.0
│ ├── underscore#1.4.4
│ └── wns#0.5.3
├─┬ azure-cli#0.7.4
│ ├── async#0.2.7
│ ├─┬ azure#0.7.17
│ │ ├── dateformat#1.0.2-1.2.3
│ │ ├── duplexer#0.1.1
│ │ ├── envconf#0.0.4
│ │ ├── mime#1.2.11
│ │ ├── mpns#2.1.0
│ │ ├── node-uuid#1.2.0
│ │ ├─┬ request#2.27.0
│ │ │ ├── aws-sign#0.3.0
│ │ │ ├── cookie-jar#0.3.0
│ │ │ ├── forever-agent#0.5.2
│ │ │ ├─┬ form-data#0.1.2
│ │ │ │ ├── async#0.2.10
│ │ │ │ └─┬ combined-stream#0.0.4
│ │ │ │ └── delayed-stream#0.0.5
│ │ │ ├─┬ hawk#1.0.0
│ │ │ │ ├── boom#0.4.2
│ │ │ │ ├── cryptiles#0.2.2
│ │ │ │ ├── hoek#0.9.1
│ │ │ │ └── sntp#0.2.4
│ │ │ ├─┬ http-signature#0.10.0
│ │ │ │ ├── asn1#0.1.11
│ │ │ │ ├── assert-plus#0.1.2
│ │ │ │ └── ctype#0.5.2
│ │ │ ├── json-stringify-safe#5.0.0
│ │ │ ├── node-uuid#1.4.1
│ │ │ ├── oauth-sign#0.3.0
│ │ │ ├── qs#0.6.6
│ │ │ └── tunnel-agent#0.3.0
│ │ ├── through#2.3.4
│ │ ├── tunnel#0.0.3
│ │ ├── underscore#1.6.0
│ │ ├── validator#3.2.1
│ │ ├── wns#0.5.3
│ │ ├─┬ xml2js#0.4.1
│ │ │ └── sax#0.5.8
│ │ └── xmlbuilder#2.1.0
│ ├── colors#0.6.2
│ ├─┬ commander#1.0.4
│ │ └── keypress#0.1.0
│ ├─┬ cucumber#0.3.1
│ │ ├─┬ browserify#1.15.5
│ │ │ ├─┬ buffer-browserify#0.0.5
│ │ │ │ └── base64-js#0.0.2
│ │ │ ├── commondir#0.0.1
│ │ │ ├── crypto-browserify#0.4.0
│ │ │ ├── deputy#0.0.4
│ │ │ ├─┬ detective#0.2.1
│ │ │ │ └── esprima#0.9.9
│ │ │ ├─┬ http-browserify#0.1.13
│ │ │ │ ├── Base64#0.1.4
│ │ │ │ └─┬ concat-stream#1.0.1
│ │ │ │ └─┬ bops#0.0.6
│ │ │ │ ├── base64-js#0.0.2
│ │ │ │ └── to-utf8#0.0.1
│ │ │ ├── nub#0.0.0
│ │ │ ├─┬ optimist#0.3.7
│ │ │ │ └── wordwrap#0.0.2
│ │ │ ├── resolve#0.2.8
│ │ │ ├─┬ syntax-error#0.0.1
│ │ │ │ └── esprima#0.9.9
│ │ │ └── vm-browserify#0.0.1
│ │ ├── coffee-script#1.4.0
│ │ ├─┬ connect#2.3.2
│ │ │ ├── cookie#0.0.3
│ │ │ ├── crc#0.2.0
│ │ │ ├── debug#0.7.3
│ │ │ ├── formidable#1.0.9
│ │ │ ├── mime#1.2.4
│ │ │ └── qs#0.4.2
│ │ ├── cucumber-html#0.2.2
│ │ ├── gherkin#2.11.5
│ │ ├─┬ jasmine-node#1.4.0
│ │ │ ├─┬ gaze#0.3.4
│ │ │ │ ├─┬ fileset#0.1.5
│ │ │ │ │ └─┬ glob#3.2.6
│ │ │ │ │ └── inherits#2.0.1
│ │ │ │ └─┬ minimatch#0.2.12
│ │ │ │ ├── lru-cache#2.3.1
│ │ │ │ └── sigmund#1.0.0
│ │ │ ├── jasmine-reporters#0.2.1
│ │ │ └── requirejs#2.1.9
│ │ ├── mkdirp#0.3.3
│ │ ├─┬ nopt#1.0.10
│ │ │ └── abbrev#1.0.4
│ │ ├─┬ rimraf#2.0.2
│ │ │ └── graceful-fs#1.1.14
│ │ ├── underscore#1.3.3
│ │ └── walkdir#0.0.4
│ ├── easy-table#0.0.1
│ ├── eyes#0.1.8
│ ├── github#0.1.6
│ ├─┬ jshint#2.3.0
│ │ ├─┬ cli#0.4.5
│ │ │ └─┬ glob#3.2.6
│ │ │ └── inherits#2.0.1
│ │ ├── console-browserify#0.1.6
│ │ ├─┬ minimatch#0.2.12
│ │ │ ├── lru-cache#2.3.1
│ │ │ └── sigmund#1.0.0
│ │ └── shelljs#0.1.4
│ ├─┬ kuduscript#0.1.5
│ │ ├─┬ commander#1.1.1
│ │ │ └── keypress#0.1.0
│ │ └── streamline#0.4.11
│ ├─┬ mocha#1.14.0
│ │ ├── commander#2.0.0
│ │ ├── debug#0.7.3
│ │ ├── diff#1.0.7
│ │ ├─┬ glob#3.2.3
│ │ │ ├── graceful-fs#2.0.1
│ │ │ ├── inherits#2.0.1
│ │ │ └─┬ minimatch#0.2.12
│ │ │ ├── lru-cache#2.3.1
│ │ │ └── sigmund#1.0.0
│ │ ├── growl#1.7.0
│ │ ├─┬ jade#0.26.3
│ │ │ ├── commander#0.6.1
│ │ │ └── mkdirp#0.3.0
│ │ └── mkdirp#0.3.5
│ ├─┬ nock#0.16.0
│ │ └── propagate#0.2.2
│ ├── node-uuid#1.2.0
│ ├── omelette#0.1.0
│ ├── should#2.0.2
│ ├─┬ sinon#1.7.3
│ │ └─┬ buster-format#0.5.6
│ │ └── buster-core#0.6.4
│ ├── streamline#0.4.5
│ ├── tunnel#0.0.2
│ ├── underscore#1.4.4
│ ├─┬ winston#0.6.2
│ │ ├── async#0.1.22
│ │ ├── colors#0.6.2
│ │ ├── cycle#1.0.3
│ │ ├── eyes#0.1.8
│ │ ├── pkginfo#0.2.3
│ │ ├── request#2.9.203
│ │ └── stack-trace#0.0.8
│ ├── winston-memory#0.1.0
│ ├─┬ xml2js#0.1.14
│ │ └── sax#0.6.0
│ └── xmlbuilder#0.4.3
├── duplexer#0.1.1
├─┬ npm#1.4.0
│ ├── abbrev#1.0.4
│ ├── ansi#0.2.1
│ ├── ansicolors#0.3.2
│ ├── ansistyles#0.1.3
│ ├── archy#0.0.2
│ ├── block-stream#0.0.7
│ ├── child-process-close#0.1.1
│ ├── chmodr#0.1.0
│ ├── chownr#0.0.1
│ ├── cmd-shim#1.1.1
│ ├── columnify#0.1.2
│ ├── editor#0.0.5
│ ├── fstream#0.1.25
│ ├─┬ fstream-npm#0.1.6
│ │ └── fstream-ignore#0.0.7
│ ├── github-url-from-git#1.1.1
│ ├── github-url-from-username-repo#0.0.2
│ ├── glob#3.2.7
│ ├── graceful-fs#2.0.1
│ ├── inherits#2.0.1
│ ├── ini#1.1.0
│ ├─┬ init-package-json#0.0.14
│ │ └── promzard#0.2.1
│ ├── lockfile#0.4.2
│ ├── lru-cache#2.5.0
│ ├─┬ minimatch#0.2.14
│ │ └── sigmund#1.0.0
│ ├── mkdirp#0.3.5
│ ├── node-gyp#0.12.2
│ ├── nopt#2.1.2
│ ├── npm-install-checks#1.0.0
│ ├── npm-registry-client#0.4.0
│ ├── npm-user-validate#0.0.3
│ ├─┬ npmconf#0.1.12
│ │ └─┬ config-chain#1.1.8
│ │ └── proto-list#1.2.2
│ ├── npmlog#0.0.6
│ ├── once#1.3.0
│ ├── opener#1.3.0
│ ├── osenv#0.0.3
│ ├── path-is-inside#1.0.0
│ ├─┬ read#1.0.5
│ │ └── mute-stream#0.0.4
│ ├── read-installed#0.2.5
│ ├─┬ read-package-json#1.1.7
│ │ └── normalize-package-data#0.2.9
│ ├─┬ request#2.30.0
│ │ ├── aws-sign2#0.5.0
│ │ ├── forever-agent#0.5.0
│ │ ├─┬ form-data#0.1.2
│ │ │ ├── async#0.2.9
│ │ │ └─┬ combined-stream#0.0.4
│ │ │ └── delayed-stream#0.0.5
│ │ ├─┬ hawk#1.0.0
│ │ │ ├── boom#0.4.2
│ │ │ ├── cryptiles#0.2.2
│ │ │ ├── hoek#0.9.1
│ │ │ └── sntp#0.2.4
│ │ ├─┬ http-signature#0.10.0
│ │ │ ├── asn1#0.1.11
│ │ │ ├── assert-plus#0.1.2
│ │ │ └── ctype#0.5.2
│ │ ├── json-stringify-safe#5.0.0
│ │ ├── mime#1.2.11
│ │ ├── node-uuid#1.4.1
│ │ ├── oauth-sign#0.3.0
│ │ ├── qs#0.6.6
│ │ ├─┬ tough-cookie#0.9.15
│ │ │ └── punycode#1.2.3
│ │ └── tunnel-agent#0.3.0
│ ├── retry#0.6.0
│ ├── rimraf#2.2.6
│ ├── semver#2.2.1
│ ├─┬ sha#1.2.3
│ │ └── readable-stream#1.0.24
│ ├── slide#1.1.5
│ ├── tar#0.1.19
│ ├── text-table#0.2.0
│ ├── uid-number#0.0.3
│ └── which#1.0.5
└── through#2.3.4
At last i have the exact error as writting in my azure.err as mentioned in the first block.
Thu Feb 13 2014 09:17:17 GMT+0100 (CET):
2 { [Error: The provided URI "https://mystorageaccountname.blob.core.windows.net/" is invalid.]
3 stack: [Getter/Setter],
4 __frame: undefined,
5 rawStack: [Getter] }
6 Error: The provided URI "https://mystorageaccountname.blob.core.windows.net/" is invalid.
7 at exports.isValidUri (/usr/local/lib/node_modules/azure-cli/node_modules/azure/lib/util/validate.js:52:11)
8 at Array.0 (/usr/local/lib/node_modules/azure-cli/node_modules/azure/lib/services/core/servicesettings.js:113:25)
9 at Object.exports.matchedSpecification (/usr/local/lib/node_modules/azure-cli/node_modules/azure/lib/services/core/servicesettings.js:226:54)
10 at Function.StorageServiceSettings.createFromSettings (/usr/local/lib/node_modules/azure-cli/node_modules/azure/lib/services/core/storageservicesettings.js:254:34)
11 at Function.StorageServiceSettings.createExplicitlyOrFromEnvironment (/usr/local/lib/node_modules/azure-cli/node_modules/azure/lib/services/core/storageservicesettings.js:335:55)
12 at Function.StorageServiceClient.getStorageSettings (/usr/local/lib/node_modules/azure-cli/node_modules/azure/lib/services/core/storageserviceclient.js:75:53)
13 at new BlobService (/usr/local/lib/node_modules/azure-cli/node_modules/azure/lib/services/blob/blobservice.js:84:53)
14 at Object.exports.createBlobService (/usr/local/lib/node_modules/azure-cli/node_modules/azure/lib/azure.js:70:10)
15 at Object.StorageUtil.getBlobService (/usr/local/lib/node_modules/azure-cli/lib/util/storage.util._js:106:21)
16 at getBlobServiceClient (/usr/local/lib/node_modules/azure-cli/lib/commands/storage.blob._js:217:39)
I hope there is someone with an idea because i can not even use the Azure service this way if i cant export a blob file to the storage.
Thanks in advance
try another name for your account storage "mystorageaccountname" may be taken before
Thanks for the replies. Indeed i changed the name of my storage account because i'd rather dont have it public. It was all lower case without any special characters or whatsoever.
I executed the following steps
npm remove azure-cli -g
npm cache clear
npm install azure-cli -g
Now everything is working again. Even though there are still some huge issues with the CLI client because i can not use it from an Azure Micro Instance. After a while the command is killed while uploading a 200MB file.
I have people at Microsoft looking at it so maybe its good that i refer to that too:
https://github.com/WindowsAzure/azure-sdk-tools-xplat/issues/1063
But after reinstalling the command is running again without the error mentioned above.

Resources