Npm packages not installing

@iignatov yes I am starting the app with the same command as mentioned.

@ishank Could you try to delete the appā€™s folder and then create the app again using:

ionic start TestApp --v2 --verbose

Are there any errors, e.g. lines starting with npm ERR!?

If this doesnā€™t help either, you could try to run (or check for another workaround in this issue):

npm cache clean
npm install -g ionic@beta cordova

@tim & @iignatov i have created the starter app using the command shared by you ionic start myapp --v2 --ts --verbose. Please find the cmd logs below:

C:\Ishank-Workarea\Personal>ionic start myapp --v2 --ts --verbose
Task setting: title=start, name=start, summary=Starts a new Ionic project in the
 specified PATH, [options]=any flags for the command, <PATH>=directory for the n
ew project, [template]=Starter templates can either come from a named template,

(ex: tabs, sidemenu, blank),
a Github repo, a Codepen url, or a local directory.
Codepen url, ex: http://codepen.io/ionic/pen/odqCz
Defaults to Ionic "tabs" starter template, --appname|-a=Human readable name for
the app (Use quotes around the name), --id|-i=Package name for <widget id> confi
g, ex: com.mycompany.myapp, title=Skip npm package installation, boolean=true, t
itle=Create a basic structure without Cordova requirements, boolean=true, title=
Setup the project to use Sass CSS precompiling, boolean=true, title=List starter
 templates available, boolean=true, --io-app-id=The Ionic.io app ID to use, --te
mplate|-t=Project starter template, boolean=true, title=Start a Ionic v2 project
, boolean=true, title=(with --v2 only) Use TypeScript in starter, --zip-file|-z=
URL to download zipfile for starter template, module=./ionic/start, disableChang
ePwd=true
Utils.preprocessCliOptions _=[start, myapp], skip-npm=false, no-cordova=false, w
=false, sass=false, s=false, list=false, l=false, v2=true, v=false, typescript=f
alse, -ts=false, ts=true, verbose=true, $0=C:\Program Files\nodejs\node.exe C:\U
sers\IBM_ADMIN\AppData\Roaming\npm\node_modules\ionic\bin\ionic
Directory already exists: C:\Ishank-Workarea\Personal\myapp
Would you like to overwrite the directory with this new project?
(yes/no): y

Creating Ionic app in folder C:\Ishank-Workarea\Personal\myapp based on tabs pro
ject
Downloading: https://github.com/driftyco/ionic2-app-base/archive/typescript.zip
[=============================]  100%  0.0s
Downloading: https://github.com/driftyco/ionic2-starter-tabs/archive/typescript.
zip
[=============================]  100%  0.0s
Installing npm packages...
Running exec command: npminstall

| |   +-- expand-brackets@0.1.5
| |   | `-- is-posix-bracket@0.1.1
| |   +-- extglob@0.3.2
| |   +-- filename-regex@2.0.0
| |   +-- is-extglob@1.0.0
| |   +-- kind-of@3.0.2
| |   +-- normalize-path@2.0.1
| |   +-- object.omit@2.0.0
| |   | +-- for-own@0.1.4
| |   | | `-- for-in@0.1.5
| |   | `-- is-extendable@0.1.1
| |   +-- parse-glob@3.0.4
| |   | +-- glob-base@0.3.0
| |   | `-- is-dotfile@1.0.2
| |   `-- regex-cache@0.4.3
| |     +-- is-equal-shallow@0.1.3
| |     `-- is-primitive@2.0.0
| +-- chokidar@1.4.3
| | +-- async-each@1.0.0
| | +-- glob-parent@2.0.0
| | +-- inherits@2.0.1
| | +-- is-binary-path@1.0.1
| | | `-- binary-extensions@1.4.0
| | +-- is-glob@2.0.1
| | `-- readdirp@2.0.0
| |   +-- minimatch@2.0.10
| |   `-- readable-stream@2.1.0
| |     `-- isarray@1.0.0
| +-- glob@5.0.15
| | +-- minimatch@3.0.0
| | `-- once@1.3.3
| |   `-- wrappy@1.0.1
| +-- glob2base@0.0.12
| | `-- find-index@0.1.1
| +-- path-is-absolute@1.0.0
| +-- readable-stream@2.1.0
| | +-- inline-process-browser@2.0.1
| | | +-- falafel@1.2.0
| | | | +-- acorn@1.2.2
| | | | +-- foreach@2.0.5
| | | | `-- object-keys@1.0.9
| | | `-- through2@0.6.5
| | |   `-- readable-stream@1.0.34
| | +-- isarray@1.0.0
| | +-- string_decoder@0.10.31
| | `-- unreachable-branch-transform@0.5.1
| |   +-- esmangle-evaluator@1.0.0
| |   `-- recast@0.11.5
| |     +-- ast-types@0.8.16
| |     +-- esprima@2.7.2
| |     `-- private@0.1.6
| +-- vinyl@0.5.3
| | +-- clone@1.0.2
| | `-- clone-stats@0.0.1
| `-- vinyl-file@1.3.0
|   +-- graceful-fs@4.1.3
|   +-- strip-bom@2.0.0
|   +-- strip-bom-stream@1.0.0
|   `-- vinyl@1.1.1
+-- ionic-angular@2.0.0-beta.6
| +-- colors@1.1.2
| +-- inquirer@0.11.0
| | +-- ansi-escapes@1.4.0
| | +-- ansi-regex@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.5.0
| | +-- readline2@1.0.1
| | | +-- code-point-at@1.0.0
| | | | `-- number-is-nan@1.0.0
| | | +-- is-fullwidth-code-point@1.0.0
| | | `-- mute-stream@0.0.5
| | +-- run-async@0.1.0
| | +-- rx-lite@3.1.2
| | `-- through@2.3.8
| +-- lodash@3.10.1
| +-- mkdirp-no-bin@0.5.1
| `-- q@1.4.1
+-- ionic-gulp-browserify-typescript@1.1.0
| +-- browserify@13.0.0
| | +-- assert@1.3.0
| | +-- browser-pack@6.0.1
| | | +-- combine-source-map@0.7.2
| | | | +-- inline-source-map@0.6.2
| | | | `-- lodash.memoize@3.0.4
| | | `-- umd@3.0.1
| | +-- browser-resolve@1.11.1
| | +-- browserify-zlib@0.1.4
| | | `-- pako@0.2.8
| | +-- buffer@4.6.0
| | | +-- base64-js@1.1.2
| | | +-- ieee754@1.1.6
| | | `-- isarray@1.0.0
| | +-- concat-stream@1.5.1
| | | +-- readable-stream@2.0.6
| | | | `-- isarray@1.0.0
| | | `-- typedarray@0.0.6
| | +-- console-browserify@1.1.0
| | | `-- date-now@0.1.4
| | +-- constants-browserify@1.0.0
| | +-- crypto-browserify@3.11.0
| | | +-- browserify-cipher@1.0.0
| | | | +-- browserify-aes@1.0.6
| | | | | `-- buffer-xor@1.0.3
| | | | +-- browserify-des@1.0.0
| | | | | `-- des.js@1.0.0
| | | | |   `-- minimalistic-assert@1.0.0
| | | | `-- evp_bytestokey@1.0.0
| | | +-- browserify-sign@4.0.0
| | | | +-- bn.js@4.11.3
| | | | +-- browserify-rsa@4.0.1
| | | | +-- elliptic@6.2.3
| | | | | +-- brorand@1.0.5
| | | | | `-- hash.js@1.0.3
| | | | `-- parse-asn1@5.0.0
| | | |   `-- asn1.js@4.6.0
| | | +-- create-ecdh@4.0.0
| | | +-- create-hash@1.1.2
| | | | +-- cipher-base@1.0.2
| | | | `-- ripemd160@1.0.1
| | | +-- create-hmac@1.1.4
| | | +-- diffie-hellman@5.0.2
| | | | `-- miller-rabin@4.0.0
| | | +-- pbkdf2@3.0.4
| | | +-- public-encrypt@4.0.0
| | | `-- randombytes@2.0.3
| | +-- defined@1.0.0
| | +-- deps-sort@2.0.0
| | +-- domain-browser@1.1.7
| | +-- duplexer2@0.1.4
| | +-- events@1.1.0
| | +-- glob@5.0.15
| | +-- has@1.0.1
| | | `-- function-bind@1.1.0
| | +-- htmlescape@1.1.1
| | +-- https-browserify@0.0.1
| | +-- insert-module-globals@7.0.1
| | | +-- is-buffer@1.1.3
| | | `-- lexical-scope@1.2.0
| | |   `-- astw@2.0.0
| | +-- isarray@0.0.1
| | +-- JSONStream@1.1.1
| | | `-- jsonparse@1.2.0
| | +-- labeled-stream-splicer@2.0.0
| | | `-- stream-splicer@2.0.0
| | |   `-- readable-stream@2.1.0
| | |     `-- isarray@1.0.0
| | +-- module-deps@4.0.5
| | | +-- detective@4.3.1
| | | +-- duplexer2@0.1.4
| | | +-- readable-stream@2.1.0
| | | | `-- isarray@1.0.0
| | | `-- stream-combiner2@1.1.1
| | |   +-- duplexer2@0.1.4
| | |   `-- readable-stream@2.1.0
| | |     `-- isarray@1.0.0
| | +-- os-browserify@0.1.2
| | +-- parents@1.0.1
| | | `-- path-platform@0.11.15
| | +-- path-browserify@0.0.0
| | +-- process@0.11.2
| | +-- punycode@1.4.1
| | +-- querystring-es3@0.2.1
| | +-- read-only-stream@2.0.0
| | | `-- readable-stream@2.1.0
| | |   `-- isarray@1.0.0
| | +-- readable-stream@2.1.0
| | | `-- isarray@1.0.0
| | +-- shasum@1.0.2
| | | +-- json-stable-stringify@0.0.1
| | | `-- sha.js@2.4.5
| | +-- shell-quote@1.6.0
| | | +-- array-filter@0.0.1
| | | +-- array-map@0.0.0
| | | +-- array-reduce@0.0.0
| | | `-- jsonify@0.0.0
| | +-- stream-browserify@2.0.1
| | | `-- readable-stream@2.1.0
| | |   `-- isarray@1.0.0
| | +-- stream-http@2.3.0
| | | +-- builtin-status-codes@2.0.0
| | | +-- readable-stream@2.1.0
| | | | `-- isarray@1.0.0
| | | `-- to-arraybuffer@1.0.1
| | +-- subarg@1.0.0
| | +-- syntax-error@1.1.6
| | | `-- acorn@2.7.0
| | +-- timers-browserify@1.4.2
| | +-- tty-browserify@0.0.0
| | +-- url@0.11.0
| | | +-- punycode@1.3.2
| | | `-- querystring@0.2.0
| | +-- util@0.10.3
| | +-- vm-browserify@0.0.4
| | | `-- indexof@0.0.1
| | `-- xtend@4.0.1
| +-- gulp-sourcemaps@1.6.0
| | +-- convert-source-map@1.1.3
| | `-- vinyl@1.1.1
| +-- gulp-uglify@1.5.3
| | +-- deap@1.0.0
| | +-- isobject@2.1.0
| | | `-- isarray@1.0.0
| | +-- uglify-js@2.6.2
| | | +-- async@0.2.10
| | | +-- source-map@0.5.5
| | | +-- uglify-to-browserify@1.0.2
| | | `-- yargs@3.10.0
| | |   +-- camelcase@1.2.1
| | |   +-- cliui@2.1.0
| | |   | +-- center-align@0.1.3
| | |   | | +-- align-text@0.1.4
| | |   | | | `-- longest@1.0.1
| | |   | | `-- lazy-cache@1.0.4
| | |   | +-- right-align@0.1.3
| | |   | `-- wordwrap@0.0.2
| | |   `-- window-size@0.1.0
| | +-- uglify-save-license@0.4.1
| | `-- vinyl-sourcemaps-apply@0.2.1
| +-- lodash.merge@4.3.5
| | +-- lodash._baseclone@4.5.6
| | +-- lodash._stack@4.1.3
| | +-- lodash.isplainobject@4.0.4
| | +-- lodash.keysin@4.1.3
| | `-- lodash.rest@4.0.2
| +-- prettysize@0.0.3
| +-- tsify@0.14.8
| | +-- debuglog@1.0.1
| | `-- typescript@1.8.10
| +-- vinyl-buffer@1.0.0
| | +-- bl@0.9.5
| | | `-- readable-stream@1.0.34
| | `-- through2@0.6.5
| |   `-- readable-stream@1.0.34
| +-- vinyl-source-stream@1.1.0
| | +-- through2@0.6.5
| | | `-- readable-stream@1.0.34
| | `-- vinyl@0.4.6
| |   `-- clone@0.2.0
| `-- watchify@3.7.0
|   `-- outpipe@1.1.1
+-- ionic-gulp-fonts-copy@1.0.0
+-- ionic-gulp-html-copy@1.0.0
+-- ionic-gulp-scripts-copy@1.0.1
+-- ionic-native@1.1.1
+-- ionicons@3.0.0-alpha.3
+-- lodash.assign@4.0.8  extraneous
+-- UNMET PEER DEPENDENCY reflect-metadata@0.1.2
+-- run-sequence@1.1.5
+-- rxjs@5.0.0-beta.2
`-- UNMET PEER DEPENDENCY zone.js@^0.6.10


npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsev
nts@1.0.11
npm WARN angular2@2.0.0-beta.15 requires a peer of reflect-metadata@0.1.2 but n
ne was installed.
npm WARN angular2@2.0.0-beta.15 requires a peer of zone.js@^0.6.10 but none was
installed.
npm WARN myapp No description
npm WARN myapp No repository field.
npm WARN myapp No license field.
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\
node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v5.11.0
npm ERR! npm  v3.8.6
npm ERR! code ELIFECYCLE

npm ERR! node-sass@3.6.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@3.6.0 postinstall script 'node scripts/build.j
'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/build.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs node-sass
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.



npm ERR! Please include the following file with any support request:
npm ERR!     C:\Ishank-Workarea\Personal\myapp\npm-debug.log

Spawn command completed
Error with start undefined
Error Initializing app: There was an error with the spawned command: npminstall
There was an error with the spawned command: npminstall

@ishank It seems to be an issue with node-sass but itā€™s hard to tell exactly which one.

I would suggest you to try to run these commands inside your appā€™s folder:

npm cache clean
npm install -g ionic@beta cordova
npm install

You could try to run the Node.js command prompt as Administrator and then execute the commands.

It seems that there are various reasons why this installation may fail - from outdated node installation (which is not your case) to not properly configured proxy or restricted permissions (i.e. enterprise environment).

If nothing helps then I would suggest you to open a new node-sass issue and post the logs\details there - I guess that theyā€™ll have a better idea what might be problem.

Right ā€¦
Correct Answer .
CLI Syntax problem.

ionic start appname --v2

for TypeScript

ionic start appname --v2 --ts

:smile::smile:

Hi, I installed the latest version ionic v2.0 and I am now getting this same npm packages installing error.
This is what I have now

Installing npm packagesā€¦
Error with start undefined
Error Initializing app: There was an error with the spawned command: npminstall
There was an error with the spawned command: npminstall
Caught exception:
undefined

Running ionic info I have this

Cordova CLI: 6.1.1
Ionic CLI Version: 2.0.0
Ionic App Lib Version: 2.0.0
ios-deploy version: Not installed
**ios-sim version: 5.0.6 **
OS: Mac OS X El Capitan
Node Version: v5.12.0
Xcode version: Xcode 7.3.1 Build version 7D1014

I am using the Node version 5x and is still getting the error, what could be wrong?Need help, pleaseā€¦

hi, may be itā€™s too late. i had the same problem and i came over another similar topic . and
1.@reedrichards suggested installing git. as i had not installed git i did and the error vanished. may be this answer should be here too. thank you @reedrichards.
2.another thing is i first tried starting Project on the ā€œdownloadā€ folder and i got this problem. so i exit and start on root folder "oxide@oxide94:~$ ionic start MyIonic2Project tutorial --v2 ".
iā€™m a noob so just making assumptions and hope i dont forget.

1 Like

@oxide94

hi, which version of node you are using ?
try it with node 6.x.x version

1 Like

@nitishrajput01 iā€™m on node 6.7.0 and i had this problem but it is solved. thanks for the reply. :slight_smile:

can you tell me how i am facing this problem also
image

I am facing the same problem and have tried lots of things but nothing worked. Seriously thinking of re-imaging my work desktop (windows 7 enterprise) and start from fresh. Every worked perfect till Ionic 2 beta11.

@airharoon
try to unistall your ionic using cmd

npm uninstall -g ionic

and install it again using
npm install -g ionic

see if you are still facing this issue ?

try using

npm uninstall -g ionic

and then again install it using npm instal -g ionic .

image
thats what i get

thats what i get

what node version are you using ?
use v5.11 or 4.x preferably.

i am using version node 6

Same problem here trying to start a new project version 2:

npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod '/home/dev/projects/stkDespacho/node_modules/esprima-fb/bin/esparse.js'
npm ERR! enoent ENOENT: no such file or directory, chmod '/home/dev/projects/stkDespacho/node_modules/esprima-fb/bin/esparse.js'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

$ ionic info


Your system information:

Cordova CLI: 6.3.1
Gulp version: CLI version 3.9.1
Gulp local:
Ionic CLI Version: 2.1.1
Ionic App Lib Version: 2.1.1
OS: Distributor ID: Ubuntu Description: Ubuntu 14.04.2 LTS
Node Version: v6.8.0


as I reinstall or upgrade my node to version 6, Crosswalk does have errorsā€¦ Should I go to version 4 which is my past node.js version?


Having so much problem while instllingā€¦ Please help me brothers