microsoft / vscode-cordova

A Visual Studio Code extension providing intellisense, debug, and build support for Cordova and Ionic projects.
https://marketplace.visualstudio.com/items?itemName=vsmobile.cordova-tools
Other
292 stars 67 forks source link

VSCode keeps failing with error "dev server timed out" on "Serve to the browser (Ionic serve)" timeout #213

Closed AlGantori closed 7 years ago

AlGantori commented 7 years ago

ionic RC0 main upgrade steps seems to have taking me to RC3, which is great :) CLI ionic server works fine on the newly created v2 project. Yesterday, before the upgrade, while under 2.0.0.beta11 VSCode debugging was working fine launching a separate window of chrome. BUT now, VSCode fails debugging into the browser with this notorious timeout error

I even tried 420000 no difference launch.json....

{
            "name": "Serve to the browser (ionic serve)",
            "type": "cordova",
            "request": "launch",
            "platform": "serve",
            "cwd": "${workspaceRoot}",
            "devServerAddress": "localhost",
            "sourceMaps": true,
            "ionicLiveReload": true
            , "devServerTimeout" : 420000
            , "port": 9222

        },

here is my package.json

 "dependencies": {
    "@angular/common": "2.1.1",
    "@angular/compiler": "2.1.1",
    "@angular/compiler-cli": "2.1.1",
    "@angular/core": "2.1.1",
    "@angular/forms": "2.1.1",
    "@angular/http": "2.1.1",
    "@angular/platform-browser": "2.1.1",
    "@angular/platform-browser-dynamic": "2.1.1",
    "@angular/platform-server": "2.1.1",
    "@ionic/app-scripts": "0.0.46",
    "@ionic/storage": "1.1.6",
    "ionic-angular": "2.0.0-rc.3",
    "ionic-native": "2.2.3",
    "ionicons": "3.0.0",
    "rxjs": "5.0.0-beta.12",
    "zone.js": "0.6.26"
  },
  "devDependencies": {
    "@ionic/app-scripts": "0.0.46",
    "typescript": "^2.0.10"
  },

ionic info

Your system information:

 ordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.3
Ionic CLI Version: 2.1.14
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.46
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 7
Node Version: v7.2.0
Xcode version: Not installed

npm -v 4.0.3 Windows 7 64bit.

"Run on Android device" works though a bit slow

I have also run cordova platform add browser Adding browser project... Running command: cmd "/s /c "C:\Users\AXM.cordova\lib\npm_cache\cordova-browser\4.1.0\package\bin\create.bat S:_W\ARP\UPS.TS\SRC\UPS.TS.RC0\platforms\browser com.ionicframework.upstsrc0660654 UPS.TS.RC0"" Creating Browser project. Path: platforms\browser Error loading cordova-browser Installing "cordova-plugin-console" for browser Installing "cordova-plugin-device" for browser Installing "cordova-plugin-splashscreen" for browser Installing "cordova-plugin-statusbar" for browser Installing "cordova-plugin-whitelist" for browser Installing "ionic-plugin-keyboard" for browser

The timeout is still occurring... How can I fix this? Thank you.

MSLaguana commented 7 years ago

Can you please go into your project and run ionic serve --nobrowser and paste the output back here? We are waiting for a particular string to be output before we believe that it has properly started. When I try it locally I get the behavior I expect, but there may be something different with your configuration that we don't anticipate.

AlGantori commented 7 years ago

Hi! thank you for given me your attention, since the post "ionic serve" quit working as well. Below is my excerpt of my log including the answer to your request (I am a novice when it comes to all of this, I understand gulp is kind of an automation/scripting like make :) but that's about it, my experience with ionic2 beta11 is only about months 7 and 8 2016, go stuck and frustrated, than I returned here month 11 to now, trying to move to RC3 and hoping my original issue(s) gets resolved https://github.com/driftyco/ionic/issues/9431, I appreciated tremendously your assistance.

here are my notes/logs....

ionic run android
works on genymotion

Comparing current tasks.json to if one regenerated by VSCode (don't know how to upload and insert image here let me know how?) https://code.visualstudio.com/docs/languages/typescript#_step-2-create-tasksjson

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "0.1.0",
    "command": "gulp",
    "isShellCommand": true,
    "args": ["--no-color"],
    "showOutput": "always"
}

I have few missing things about Gulp installation and its dependencies (don't know how to upload and insert image here let me know how?)

copied over folders:

gulp
gulp-watch
del
browser-sync
ionic-gulp-*
run-sequence-

but VSCode run error now is "The Ionic live reload server exited unexpectedly"

Need to resolve npm conflict

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\browser-sync\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\gulp-watch\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\ionic-gulp-browserify-typescript\node_modules\watchify\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN enoent ENOENT: no such file or directory, open 'S:\_W\ARP\UPS.TS\SRC\UPS.TS.RC0\node_modules\node-sass\package.json'

Of course I have no idea what I am doing nor what chokidar is I think it's telling me app-scripts expects a newer version 1.6.1

$ npm list chokidar ionic-hello-world@ S:_W\ARP\UPS.TS\SRC\UPS.TS.RC0 +-- @ionic/app-scripts@0.0.46 | -- chokidar@1.6.1 +-- browser-sync@2.18.2 |-- chokidar@1.6.0 -- gulp-watch@4.3.9 -- chokidar@1.6.0

Performed more installs npm install gulp-watch npm install browser-sync

now... npm list chokidar ionic-hello-world@ S:_W\ARP\UPS.TS\SRC\UPS.TS.RC0 +-- @ionic/app-scripts@0.0.46 | -- chokidar@1.6.1 -- browser-sync@2.18.2 `-- chokidar@1.6.0

NEED MORE WORK...

20161208 OK good news, "MSLaguana" responds to post and output from "ionic serve --nobrowser" However, "ionic serve" has quit working perhaps because of the steps above about "gulp"

$ ionic serve --nobrowser
Uh oh! Looks like you're missing a module in your gulpfile:
Cannot find module 'internal/fs'

Do you need to run `npm install`?
AXM@VRL MINGW64 /s/_W/ARP/UPS.TS/SRC/UPS.TS.RC0
$ npm install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\browser-sync\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN enoent ENOENT: no such file or directory, open 'S:\_W\ARP\UPS.TS\SRC\UPS.TS.RC0\node_modules\node-sass\package.json'

Now what? npm install seems to return similar errors, minor progress...

MSLaguana commented 7 years ago

I would suggest that you delete your whole node_modules folder, and then run npm install and see if that gets you back in working order. I would suggest that you avoid just copying folders around in future, since with npm version 3 they may have dependencies adjacent to them that you aren't aware of. Much simpler just to npm install packages.

If clearing out node_modules and re-installing works, can you please try ionic serve --nobrowser again and see if that gives some useful output?

AlGantori commented 7 years ago

So I blew away 29,976 files and 4,692 Folders (270 MB) this is insane :) and here is the install, serve output and my packages.json

AXM@VRL MINGW64 /s/_W/ARP/UPS.TS/SRC/UPS.TS.RC0
$ npm install
npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm WARN deprecated node-uuid@1.4.7: use uuid module instead
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN prefer global node-gyp@3.4.0 should be installed with -g

> node-sass@3.10.1 install S:\_W\ARP\UPS.TS\SRC\UPS.TS.RC0\node_modules\node-sass
> node scripts/install.js

Start downloading binary at https://github.com/sass/node-sass/releases/download/v3.10.1/win32-x64-51_binding.node
Binary downloaded and installed at S:\_W\ARP\UPS.TS\SRC\UPS.TS.RC0\node_modules\node-sass\vendor\win32-x64-51\binding.node

> node-sass@3.10.1 postinstall S:\_W\ARP\UPS.TS\SRC\UPS.TS.RC0\node_modules\node-sass
> node scripts/build.js

"S:\_W\ARP\UPS.TS\SRC\UPS.TS.RC0\node_modules\node-sass\vendor\win32-x64-51\binding.node" exists.
 testing binary.
Binary is fine; exiting.
ionic-hello-world@ S:\_W\ARP\UPS.TS\SRC\UPS.TS.RC0
+-- @angular/common@2.1.1
+-- @angular/compiler@2.1.1
+-- @angular/compiler-cli@2.1.1
| +-- @angular/tsc-wrapped@0.3.0
| | `-- tsickle@0.1.7
| |   `-- source-map-support@0.3.3
| |     `-- source-map@0.1.32
| +-- minimist@1.2.0
| `-- reflect-metadata@0.1.8
+-- @angular/core@2.1.1
+-- @angular/forms@2.1.1
+-- @angular/http@2.1.1
+-- @angular/platform-browser@2.1.1
+-- @angular/platform-browser-dynamic@2.1.1
+-- @angular/platform-server@2.1.1
| `-- parse5@2.2.3
+-- @ionic/app-scripts@0.0.46
| +-- autoprefixer@6.4.1
| | +-- browserslist@1.3.6
| | +-- caniuse-db@1.0.30000592
| | +-- normalize-range@0.1.2
| | +-- num2fraction@1.2.2
| | `-- postcss-value-parser@3.3.0
| +-- 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
| +-- chokidar@1.6.1
| | +-- async-each@1.0.1
| | +-- inherits@2.0.3
| | +-- is-binary-path@1.0.1
| | | `-- binary-extensions@1.8.0
| | +-- is-glob@2.0.1
| | `-- readdirp@2.1.0
| |   `-- set-immediate-shim@1.0.1
| +-- clean-css@3.4.19
| | +-- commander@2.8.1
| | | `-- graceful-readlink@1.0.1
| | `-- source-map@0.4.4
| |   `-- amdefine@1.0.1
| +-- cross-spawn@4.0.0
| | +-- lru-cache@4.0.2
| | | +-- pseudomap@1.0.2
| | | `-- yallist@2.0.0
| | `-- which@1.2.12
| |   `-- isexe@1.1.2
| +-- express@4.14.0
| | +-- accepts@1.3.3
| | | `-- negotiator@0.6.1
| | +-- array-flatten@1.1.1
| | +-- content-disposition@0.5.1
| | +-- content-type@1.0.2
| | +-- cookie@0.3.1
| | +-- cookie-signature@1.0.6
| | +-- debug@2.2.0
| | | `-- ms@0.7.1
| | +-- depd@1.1.0
| | +-- encodeurl@1.0.1
| | +-- escape-html@1.0.3
| | +-- etag@1.7.0
| | +-- finalhandler@0.5.0
| | | +-- statuses@1.3.1
| | | `-- unpipe@1.0.0
| | +-- fresh@0.3.0
| | +-- merge-descriptors@1.0.1
| | +-- methods@1.1.2
| | +-- on-finished@2.3.0
| | | `-- ee-first@1.1.1
| | +-- parseurl@1.3.1
| | +-- path-to-regexp@0.1.7
| | +-- proxy-addr@1.1.2
| | | +-- forwarded@0.1.0
| | | `-- ipaddr.js@1.1.1
| | +-- qs@6.2.0
| | +-- range-parser@1.2.0
| | +-- send@0.14.1
| | | +-- destroy@1.0.4
| | | `-- mime@1.3.4
| | +-- type-is@1.6.14
| | | `-- media-typer@0.3.0
| | +-- utils-merge@1.0.0
| | `-- vary@1.1.0
| +-- fs-extra@0.30.0
| | +-- graceful-fs@4.1.11
| | +-- jsonfile@2.4.0
| | `-- klaw@1.3.1
| +-- json-loader@0.5.4
| +-- node-sass@3.10.1
| | +-- async-foreach@0.1.3
| | +-- cross-spawn@3.0.1
| | +-- gaze@1.1.2
| | | `-- globule@1.1.0
| | +-- get-stdin@4.0.1
| | +-- glob@7.1.1
| | | +-- fs.realpath@1.0.0
| | | +-- inflight@1.0.6
| | | | `-- wrappy@1.0.2
| | | `-- once@1.4.0
| | +-- in-publish@2.0.0
| | +-- lodash.clonedeep@4.5.0
| | +-- meow@3.7.0
| | | +-- camelcase-keys@2.1.0
| | | | `-- camelcase@2.1.1
| | | +-- 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
| | | +-- normalize-package-data@2.3.5
| | | | +-- hosted-git-info@2.1.5
| | | | +-- is-builtin-module@1.0.0
| | | | `-- validate-npm-package-license@3.0.1
| | | |   +-- spdx-correct@1.0.2
| | | |   | `-- spdx-license-ids@1.2.2
| | | |   `-- spdx-expression-parse@1.0.4
| | | +-- 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
| | +-- nan@2.4.0
| | +-- node-gyp@3.4.0
| | | +-- fstream@1.0.10
| | | +-- nopt@3.0.6
| | | | `-- abbrev@1.0.9
| | | +-- npmlog@3.1.2
| | | | `-- gauge@2.6.0
| | | |   `-- has-color@0.1.7
| | | +-- osenv@0.1.3
| | | | `-- os-tmpdir@1.0.2
| | | +-- path-array@1.0.1
| | | | `-- array-index@1.0.0
| | | |   `-- es6-symbol@3.1.0
| | | |     +-- d@0.1.1
| | | |     `-- es5-ext@0.10.12
| | | |       `-- es6-iterator@2.0.0
| | | +-- semver@5.3.0
| | | `-- tar@2.2.1
| | |   `-- block-stream@0.0.9
| | +-- npmlog@4.0.1
| | | +-- are-we-there-yet@1.1.2
| | | | `-- delegates@1.0.0
| | | +-- console-control-strings@1.1.0
| | | `-- gauge@2.7.2
| | |   +-- aproba@1.0.4
| | |   +-- has-unicode@2.0.1
| | |   +-- supports-color@0.2.0
| | |   `-- wide-align@1.1.0
| | +-- request@2.79.0
| | | +-- aws-sign2@0.6.0
| | | +-- aws4@1.5.0
| | | +-- caseless@0.11.0
| | | +-- combined-stream@1.0.5
| | | | `-- delayed-stream@1.0.0
| | | +-- forever-agent@0.6.1
| | | +-- form-data@2.1.2
| | | | `-- asynckit@0.4.0
| | | +-- har-validator@2.0.6
| | | | +-- commander@2.9.0
| | | | `-- 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.0
| | | +-- 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.1
| | | |   +-- asn1@0.2.3
| | | |   +-- assert-plus@1.0.0
| | | |   +-- bcrypt-pbkdf@1.0.0
| | | |   +-- 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.4
| | | +-- is-typedarray@1.0.0
| | | +-- isstream@0.1.2
| | | +-- json-stringify-safe@5.0.1
| | | +-- oauth-sign@0.8.2
| | | +-- qs@6.3.0
| | | +-- stringstream@0.0.5
| | | +-- tough-cookie@2.3.2
| | | +-- tunnel-agent@0.4.3
| | | `-- uuid@3.0.1
| | `-- sass-graph@2.1.2
| |   +-- lodash@4.16.6
| |   `-- yargs@4.8.1
| |     `-- yargs-parser@2.4.1
| |       `-- camelcase@3.0.0
| +-- os-name@2.0.1
| | +-- macos-release@1.0.0
| | `-- win-release@1.1.1
| +-- postcss@5.2.0
| | +-- js-base64@2.1.9
| | +-- source-map@0.5.6
| | `-- supports-color@3.1.2
| |   `-- has-flag@1.0.0
| +-- proxy-middleware@0.15.0
| +-- rollup@0.36.3
| | `-- source-map-support@0.4.6
| |   `-- source-map@0.5.6
| +-- rollup-plugin-commonjs@5.0.4
| | +-- acorn@4.0.3
| | +-- estree-walker@0.2.1
| | +-- magic-string@0.16.0
| | | `-- vlq@0.2.1
| | `-- resolve@1.1.7
| +-- rollup-plugin-json@2.0.2
| +-- rollup-plugin-node-builtins@2.0.0
| | +-- buffer-es6@4.9.3
| | +-- 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.6
| | | | +-- browserify-rsa@4.0.1
| | | | +-- elliptic@6.3.2
| | | | | +-- brorand@1.0.6
| | | | | `-- hash.js@1.0.3
| | | | `-- parse-asn1@5.0.0
| | | |   `-- asn1.js@4.9.0
| | | +-- create-ecdh@4.0.0
| | | +-- create-hash@1.1.2
| | | | +-- cipher-base@1.0.3
| | | | `-- ripemd160@1.0.1
| | | +-- create-hmac@1.1.4
| | | +-- diffie-hellman@5.0.2
| | | | `-- miller-rabin@4.0.0
| | | +-- pbkdf2@3.0.9
| | | +-- public-encrypt@4.0.0
| | | `-- randombytes@2.0.3
| | `-- process-es6@0.11.6
| +-- rollup-plugin-node-globals@1.0.9
| +-- rollup-plugin-node-resolve@2.0.0
| | +-- browser-resolve@1.11.2
| | `-- builtin-modules@1.1.1
| +-- rollup-pluginutils@1.5.2
| | `-- minimatch@3.0.3
| |   `-- brace-expansion@1.1.6
| |     +-- balanced-match@0.4.2
| |     `-- concat-map@0.0.1
| +-- tiny-lr@1.0.3
| | +-- body@5.1.0
| | | +-- continuable-cache@0.3.1
| | | +-- error@7.0.2
| | | | `-- string-template@0.2.1
| | | +-- raw-body@1.1.7
| | | | `-- bytes@1.0.0
| | | `-- safe-json-parse@1.0.1
| | +-- faye-websocket@0.10.0
| | | `-- websocket-driver@0.6.5
| | |   `-- websocket-extensions@0.1.1
| | `-- livereload-js@2.2.2
| +-- tslint@3.15.1
| | +-- colors@1.1.2
| | +-- diff@2.2.3
| | +-- findup-sync@0.3.0
| | | `-- glob@5.0.15
| | +-- optimist@0.6.1
| | | +-- minimist@0.0.10
| | | `-- wordwrap@0.0.3
| | `-- underscore.string@3.3.4
| |   `-- sprintf-js@1.0.3
| +-- tslint-eslint-rules@1.5.0
| | `-- doctrine@0.7.2
| |   +-- esutils@1.1.6
| |   `-- isarray@0.0.1
| +-- uglify-js@2.7.3
| | +-- async@0.2.10
| | +-- source-map@0.5.6
| | +-- 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
| +-- webpack@2.1.0-beta.27
| | +-- ajv@4.9.2
| | | +-- co@4.6.0
| | | `-- json-stable-stringify@1.0.1
| | +-- ajv-keywords@1.2.0
| | +-- async@2.1.4
| | +-- enhanced-resolve@2.3.0
| | +-- loader-runner@2.2.0
| | +-- loader-utils@0.2.16
| | | +-- big.js@3.1.3
| | | +-- emojis-list@2.1.0
| | | `-- json5@0.5.1
| | +-- memory-fs@0.3.0
| | | `-- errno@0.1.4
| | |   `-- prr@0.0.0
| | +-- node-libs-browser@1.1.1
| | | +-- assert@1.4.1
| | | `-- os-browserify@0.2.1
| | +-- source-map@0.5.6
| | +-- tapable@0.2.5
| | +-- watchpack@1.1.0
| | | `-- async@2.0.0-rc.4
| | +-- webpack-sources@0.1.3
| | | +-- source-list-map@0.1.7
| | | `-- source-map@0.5.6
| | `-- yargs@6.5.0
| |   +-- camelcase@3.0.0
| |   `-- yargs-parser@4.2.0
| `-- ws@1.1.1
|   +-- options@0.0.6
|   `-- ultron@1.0.2
+-- @ionic/storage@1.1.6
| +-- @types/localforage@0.0.30
| +-- localforage@1.4.3
| | `-- lie@3.0.2
| |   +-- es3ify@0.1.4
| |   | +-- esprima-fb@3001.1.0-dev-harmony-fb
| |   | `-- jstransform@3.0.0
| |   |   +-- base62@0.1.1
| |   |   `-- source-map@0.1.31
| |   +-- immediate@3.0.6
| |   +-- inline-process-browser@1.0.0
| |   | `-- falafel@1.2.0
| |   |   +-- acorn@1.2.2
| |   |   +-- foreach@2.0.5
| |   |   +-- isarray@0.0.1
| |   |   `-- object-keys@1.0.11
| |   `-- unreachable-branch-transform@0.3.0
| |     +-- esmangle-evaluator@1.0.1
| |     `-- recast@0.10.43
| |       +-- ast-types@0.8.15
| |       +-- esprima-fb@15001.1001.0-dev-harmony-fb
| |       +-- private@0.1.6
| |       `-- source-map@0.5.6
| `-- localforage-cordovasqlitedriver@1.5.0
+-- browser-sync@2.18.2
| +-- browser-sync-client@2.4.3
| +-- browser-sync-ui@0.6.1
| | +-- async-each-series@0.1.1
| | +-- connect-history-api-fallback@1.3.0
| | +-- stream-throttle@0.1.3
| | | `-- limiter@1.1.0
| | `-- weinre@2.0.0-pre-I0Z7U9OV
| |   +-- express@2.5.11
| |   | +-- connect@1.9.2
| |   | | `-- formidable@1.0.17
| |   | +-- mime@1.2.4
| |   | +-- mkdirp@0.3.0
| |   | `-- qs@0.4.2
| |   `-- underscore@1.7.0
| +-- bs-recipes@1.3.2
| +-- chokidar@1.6.0
| +-- connect@3.5.0
| +-- dev-ip@1.0.1
| +-- easy-extender@2.3.2
| | `-- lodash@3.10.1
| +-- eazy-logger@3.0.2
| | `-- tfunk@3.0.2
| |   `-- object-path@0.9.2
| +-- emitter-steward@1.0.0
| +-- http-proxy@1.15.1
| | +-- eventemitter3@1.2.0
| | `-- requires-port@1.0.0
| +-- immutable@3.8.1
| +-- localtunnel@1.8.1
| | +-- openurl@1.1.0
| | +-- request@2.65.0
| | | +-- bl@1.0.3
| | | | `-- readable-stream@2.0.6
| | | +-- form-data@1.0.1
| | | | `-- async@2.1.4
| | | +-- http-signature@0.11.0
| | | | +-- asn1@0.1.11
| | | | +-- assert-plus@0.1.5
| | | | `-- ctype@0.5.3
| | | +-- node-uuid@1.4.7
| | | +-- qs@5.2.1
| | | `-- tough-cookie@2.2.2
| | `-- yargs@3.29.0
| |   +-- camelcase@1.2.1
| |   `-- window-size@0.1.4
| +-- micromatch@2.3.11
| | +-- arr-diff@2.0.0
| | | `-- arr-flatten@1.0.1
| | +-- array-unique@0.2.1
| | +-- braces@1.8.5
| | | +-- expand-range@1.8.2
| | | | `-- fill-range@2.2.3
| | | |   +-- is-number@2.1.0
| | | |   +-- randomatic@1.1.6
| | | |   `-- repeat-string@1.6.1
| | | +-- preserve@0.2.0
| | | `-- repeat-element@1.1.2
| | +-- 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.1.0
| | | `-- is-buffer@1.1.4
| | +-- normalize-path@2.0.1
| | +-- object.omit@2.0.1
| | | +-- for-own@0.1.4
| | | | `-- for-in@0.1.6
| | | `-- 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
| +-- opn@4.0.2
| +-- portscanner@1.2.0
| | `-- async@1.5.2
| +-- qs@6.2.1
| +-- resp-modifier@6.0.2
| +-- rx@4.1.0
| +-- serve-index@1.8.0
| | +-- batch@0.5.3
| | +-- http-errors@1.5.1
| | | `-- setprototypeof@1.0.2
| | `-- mime-types@2.1.13
| |   `-- mime-db@1.25.0
| +-- serve-static@1.11.1
| +-- server-destroy@1.0.1
| +-- socket.io@1.5.0
| | +-- engine.io@1.7.0
| | | +-- base64id@0.1.0
| | | `-- engine.io-parser@1.3.0
| | |   +-- after@0.8.1
| | |   +-- arraybuffer.slice@0.0.6
| | |   +-- base64-arraybuffer@0.1.5
| | |   +-- blob@0.0.4
| | |   +-- has-binary@0.1.6
| | |   | `-- isarray@0.0.1
| | |   `-- wtf-8@1.0.0
| | +-- has-binary@0.1.7
| | | `-- isarray@0.0.1
| | +-- socket.io-adapter@0.4.0
| | | `-- socket.io-parser@2.2.2
| | |   +-- debug@0.7.4
| | |   +-- isarray@0.0.1
| | |   `-- json3@3.2.6
| | +-- socket.io-client@1.5.0
| | | +-- backo2@1.0.2
| | | +-- component-bind@1.0.0
| | | +-- component-emitter@1.2.0
| | | +-- engine.io-client@1.7.0
| | | | +-- component-inherit@0.0.3
| | | | +-- has-cors@1.1.0
| | | | +-- parsejson@0.0.1
| | | | +-- parseqs@0.0.2
| | | | +-- xmlhttprequest-ssl@1.5.1
| | | | `-- yeast@0.1.2
| | | +-- indexof@0.0.1
| | | +-- object-component@0.0.3
| | | +-- parseuri@0.0.4
| | | | `-- better-assert@1.0.2
| | | |   `-- callsite@1.0.0
| | | `-- to-array@0.1.4
| | `-- socket.io-parser@2.2.6
| |   +-- benchmark@1.0.0
| |   +-- component-emitter@1.1.2
| |   +-- isarray@0.0.1
| |   `-- json3@3.3.2
| +-- ua-parser-js@0.7.10
| `-- yargs@6.0.0
|   +-- cliui@3.2.0
|   | `-- wrap-ansi@2.1.0
|   +-- decamelize@1.2.0
|   +-- get-caller-file@1.0.2
|   +-- os-locale@1.4.0
|   | `-- lcid@1.0.0
|   |   `-- invert-kv@1.0.0
|   +-- 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.0
|   |   |     `-- is-arrayish@0.2.1
|   |   `-- path-type@1.1.0
|   +-- require-directory@2.1.1
|   +-- require-main-filename@1.0.1
|   +-- set-blocking@2.0.0
|   +-- string-width@1.0.2
|   | +-- code-point-at@1.1.0
|   | `-- is-fullwidth-code-point@1.0.0
|   |   `-- number-is-nan@1.0.1
|   +-- which-module@1.0.0
|   +-- window-size@0.2.0
|   +-- y18n@3.2.1
|   `-- yargs-parser@4.2.0
|     `-- camelcase@3.0.0
+-- del@2.2.1
| +-- globby@5.0.0
| | +-- array-union@1.0.2
| | `-- arrify@1.0.1
| +-- is-path-cwd@1.0.0
| +-- is-path-in-cwd@1.0.0
| | `-- is-path-inside@1.0.0
| |   `-- path-is-inside@1.0.2
| +-- object-assign@4.1.0
| +-- pify@2.3.0
| +-- pinkie-promise@2.0.1
| | `-- pinkie@2.0.4
| `-- rimraf@2.5.4
+-- gulp@3.9.1
| +-- archy@1.0.0
| +-- deprecated@0.0.1
| +-- gulp-util@3.0.7
| | +-- array-differ@1.0.0
| | +-- array-uniq@1.0.3
| | +-- beeper@1.1.1
| | +-- dateformat@1.0.12
| | +-- fancy-log@1.2.0
| | | `-- time-stamp@1.0.1
| | +-- gulplog@1.0.0
| | | `-- glogg@1.0.0
| | +-- has-gulplog@0.1.0
| | | `-- sparkles@1.0.0
| | +-- lodash._reescape@3.0.0
| | +-- lodash._reevaluate@3.0.0
| | +-- lodash._reinterpolate@3.0.0
| | +-- lodash.template@3.6.2
| | | +-- lodash._basecopy@3.0.1
| | | +-- lodash._basetostring@3.0.1
| | | +-- lodash._basevalues@3.0.0
| | | +-- lodash._isiterateecall@3.0.9
| | | +-- lodash.escape@3.2.0
| | | | `-- lodash._root@3.0.1
| | | +-- lodash.keys@3.1.2
| | | | +-- lodash._getnative@3.9.1
| | | | +-- lodash.isarguments@3.1.0
| | | | `-- lodash.isarray@3.0.4
| | | +-- lodash.restparam@3.6.1
| | | `-- lodash.templatesettings@3.1.1
| | +-- multipipe@0.1.2
| | | `-- duplexer2@0.0.2
| | |   `-- readable-stream@1.1.14
| | |     `-- isarray@0.0.1
| | +-- object-assign@3.0.0
| | +-- replace-ext@0.0.1
| | `-- through2@2.0.3
| +-- interpret@1.0.1
| +-- liftoff@2.3.0
| | +-- extend@3.0.0
| | +-- findup-sync@0.4.3
| | | +-- detect-file@0.1.0
| | | | `-- fs-exists-sync@0.1.0
| | | `-- resolve-dir@0.1.1
| | |   `-- global-modules@0.2.3
| | |     `-- global-prefix@0.1.5
| | |       +-- homedir-polyfill@1.0.1
| | |       | `-- parse-passwd@1.0.0
| | |       `-- ini@1.3.4
| | +-- fined@1.0.2
| | | +-- expand-tilde@1.2.2
| | | +-- lodash.assignwith@4.2.0
| | | +-- lodash.isempty@4.4.0
| | | +-- lodash.pick@4.4.0
| | | `-- parse-filepath@1.0.1
| | |   +-- is-absolute@0.2.6
| | |   | +-- is-relative@0.2.1
| | |   | | `-- is-unc-path@0.1.2
| | |   | |   `-- unc-path-regex@0.1.2
| | |   | `-- is-windows@0.2.0
| | |   +-- map-cache@0.2.2
| | |   `-- path-root@0.1.1
| | |     `-- path-root-regex@0.1.2
| | +-- flagged-respawn@0.3.2
| | +-- lodash.isplainobject@4.0.6
| | +-- lodash.isstring@4.0.1
| | +-- lodash.mapvalues@4.6.0
| | `-- rechoir@0.6.2
| +-- orchestrator@0.3.8
| | +-- end-of-stream@0.1.5
| | | `-- once@1.3.3
| | +-- sequencify@0.0.7
| | `-- stream-consume@0.1.0
| +-- pretty-hrtime@1.0.3
| +-- semver@4.3.6
| +-- tildify@1.2.0
| | `-- os-homedir@1.0.2
| +-- v8flags@2.0.11
| | `-- user-home@1.1.1
| `-- vinyl-fs@0.3.14
|   +-- defaults@1.0.3
|   +-- glob-stream@3.1.18
|   | +-- glob@4.5.3
|   | +-- glob2base@0.0.12
|   | | `-- find-index@0.1.1
|   | +-- minimatch@2.0.10
|   | +-- ordered-read-streams@0.1.0
|   | `-- unique-stream@1.0.0
|   +-- glob-watcher@0.0.6
|   | `-- gaze@0.5.2
|   |   `-- globule@0.1.0
|   |     +-- glob@3.1.21
|   |     | +-- graceful-fs@1.2.3
|   |     | `-- inherits@1.0.2
|   |     +-- lodash@1.0.2
|   |     `-- minimatch@0.2.14
|   |       +-- lru-cache@2.7.3
|   |       `-- sigmund@1.0.1
|   +-- graceful-fs@3.0.11
|   | `-- natives@1.1.0
|   +-- strip-bom@1.0.0
|   | +-- first-chunk-stream@1.0.0
|   | `-- is-utf8@0.2.1
|   +-- through2@0.6.5
|   | `-- readable-stream@1.0.34
|   |   `-- isarray@0.0.1
|   `-- vinyl@0.4.6
|     `-- clone@0.2.0
+-- gulp-watch@4.3.9
| +-- anymatch@1.3.0
| +-- glob-parent@2.0.0
| +-- path-is-absolute@1.0.1
| +-- readable-stream@2.2.2
| | +-- 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
| +-- vinyl@0.5.3
| | +-- clone@1.0.2
| | `-- clone-stats@0.0.1
| `-- vinyl-file@1.3.0
|   +-- strip-bom@2.0.0
|   +-- strip-bom-stream@1.0.0
|   `-- vinyl@1.2.0
+-- ionic-angular@2.0.0-rc.3
+-- ionic-gulp-browserify-typescript@2.0.0
| +-- browserify@13.1.1
| | +-- assert@1.3.0
| | +-- browser-pack@6.0.2
| | | +-- combine-source-map@0.7.2
| | | | +-- inline-source-map@0.6.2
| | | | | `-- source-map@0.5.6
| | | | +-- lodash.memoize@3.0.4
| | | | `-- source-map@0.5.6
| | | +-- through2@2.0.3
| | | `-- umd@3.0.1
| | +-- browserify-zlib@0.1.4
| | | `-- pako@0.2.9
| | +-- buffer@4.9.1
| | | +-- base64-js@1.2.0
| | | `-- ieee754@1.1.8
| | +-- cached-path-relative@1.0.0
| | +-- concat-stream@1.5.2
| | | +-- readable-stream@2.0.6
| | | `-- typedarray@0.0.6
| | +-- console-browserify@1.1.0
| | | `-- date-now@0.1.4
| | +-- constants-browserify@1.0.0
| | +-- defined@1.0.0
| | +-- deps-sort@2.0.0
| | | `-- through2@2.0.3
| | +-- domain-browser@1.1.7
| | +-- duplexer2@0.1.4
| | +-- events@1.1.1
| | +-- 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
| | | +-- lexical-scope@1.2.0
| | | | `-- astw@2.0.0
| | | |   `-- acorn@1.2.2
| | | `-- through2@2.0.3
| | +-- JSONStream@1.2.1
| | | +-- jsonparse@1.2.0
| | | `-- through@2.3.8
| | +-- labeled-stream-splicer@2.0.0
| | | +-- isarray@0.0.1
| | | `-- stream-splicer@2.0.0
| | +-- module-deps@4.0.8
| | | +-- detective@4.3.2
| | | | `-- acorn@3.3.0
| | | +-- duplexer2@0.1.4
| | | +-- stream-combiner2@1.1.1
| | | | `-- duplexer2@0.1.4
| | | `-- through2@2.0.3
| | +-- os-browserify@0.1.2
| | +-- parents@1.0.1
| | | `-- path-platform@0.11.15
| | +-- path-browserify@0.0.0
| | +-- process@0.11.9
| | +-- punycode@1.4.1
| | +-- querystring-es3@0.2.1
| | +-- read-only-stream@2.0.0
| | +-- shasum@1.0.2
| | | +-- json-stable-stringify@0.0.1
| | | `-- sha.js@2.4.8
| | +-- shell-quote@1.6.1
| | | +-- array-filter@0.0.1
| | | +-- array-map@0.0.0
| | | +-- array-reduce@0.0.0
| | | `-- jsonify@0.0.0
| | +-- stream-browserify@2.0.1
| | +-- stream-http@2.5.0
| | | +-- builtin-status-codes@2.0.0
| | | `-- to-arraybuffer@1.0.1
| | +-- subarg@1.0.0
| | +-- syntax-error@1.1.6
| | | `-- acorn@2.7.0
| | +-- through2@2.0.3
| | +-- 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
| | | `-- inherits@2.0.1
| | +-- vm-browserify@0.0.4
| | `-- xtend@4.0.1
| +-- gulp-sourcemaps@1.9.1
| | +-- convert-source-map@1.1.3
| | +-- css@2.2.1
| | | +-- source-map@0.1.43
| | | +-- source-map-resolve@0.3.1
| | | | +-- atob@1.1.3
| | | | +-- resolve-url@0.2.1
| | | | `-- source-map-url@0.3.0
| | | `-- urix@0.1.0
| | +-- debug-fabulous@0.0.4
| | | `-- lazy-debug-legacy@0.0.1
| | +-- detect-newline@2.1.0
| | +-- through2@2.0.3
| | `-- vinyl@1.2.0
| +-- gulp-uglify@1.5.4
| | +-- deap@1.0.0
| | +-- isobject@2.1.0
| | +-- through2@2.0.3
| | +-- uglify-js@2.6.4
| | | +-- source-map@0.5.6
| | | `-- yargs@3.10.0
| | |   +-- camelcase@1.2.1
| | |   +-- cliui@2.1.0
| | |   | `-- wordwrap@0.0.2
| | |   `-- window-size@0.1.0
| | +-- uglify-save-license@0.4.1
| | `-- vinyl-sourcemaps-apply@0.2.1
| |   `-- source-map@0.5.6
| +-- lodash.merge@4.6.0
| +-- prettysize@0.0.3
| +-- tsify@0.14.8
| | +-- debuglog@1.0.1
| | +-- through2@2.0.3
| | `-- typescript@1.8.10
| +-- vinyl-buffer@1.0.0
| | `-- bl@0.9.5
| |   `-- readable-stream@1.0.34
| |     `-- isarray@0.0.1
| +-- vinyl-source-stream@1.1.0
| | `-- vinyl@0.4.6
| |   `-- clone@0.2.0
| `-- watchify@3.7.0
|   +-- outpipe@1.1.1
|   `-- through2@2.0.3
+-- ionic-gulp-fonts-copy@1.0.0
+-- ionic-gulp-html-copy@1.0.0
+-- ionic-gulp-sass-build@1.0.0
| +-- gulp-autoprefixer@3.1.1
| | `-- through2@2.0.3
| +-- gulp-sass@2.3.2
| | `-- through2@2.0.3
| `-- lodash.assign@4.2.0
+-- ionic-gulp-scripts-copy@2.0.1
+-- ionic-native@2.2.3
+-- ionicons@3.0.0
+-- run-sequence@1.2.2
+-- rxjs@5.0.0-beta.12
| `-- symbol-observable@1.0.4
+-- typescript@2.0.10
`-- zone.js@0.6.26

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\browser-sync\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

Here is npm serve --nobrowser

$ ionic serve --nobrowser
Uh oh! Looks like you're missing a module in your gulpfile:
Cannot find module 'shelljs'

Do you need to run `npm install`?

Should I run npm install shelljs?

Here is my packages.json

{
  "name": "ionic-hello-world",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"

  },
  "dependencies": {
    "@angular/common": "2.1.1",
    "@angular/compiler": "2.1.1",
    "@angular/compiler-cli": "2.1.1",
    "@angular/core": "2.1.1",
    "@angular/forms": "2.1.1",
    "@angular/http": "2.1.1",
    "@angular/platform-browser": "2.1.1",
    "@angular/platform-browser-dynamic": "2.1.1",
    "@angular/platform-server": "2.1.1",
    "@ionic/app-scripts": "0.0.46",
    "@ionic/storage": "1.1.6",
    "ionic-angular": "2.0.0-rc.3",
    "ionic-native": "2.2.3",
    "ionicons": "3.0.0",
    "rxjs": "5.0.0-beta.12",
    "zone.js": "0.6.26"

    ,"browser-sync": "^2.14.0",
    "del": "2.2.1",
    "gulp": "3.9.1",
    "gulp-watch": "4.3.9",
    "ionic-gulp-browserify-typescript": "2.0.0",
    "ionic-gulp-fonts-copy": "^1.0.0",
    "ionic-gulp-html-copy": "^1.0.0",
    "ionic-gulp-sass-build": "^1.0.0",
    "ionic-gulp-scripts-copy": "^2.0.0",
    "run-sequence": "1.2.2"
  },
  "devDependencies": {
    "@ionic/app-scripts": "0.0.46",
    "typescript": "^2.0.10"
  },
  "cordovaPlugins": [
    "cordova-plugin-whitelist",
    "cordova-plugin-console",
    "cordova-plugin-statusbar",
    "cordova-plugin-device",
    "cordova-plugin-splashscreen",
    "ionic-plugin-keyboard"
  ],
  "cordovaPlatforms": [],
  "description": "UPS.TS.RC0: An Ionic project"
}
MSLaguana commented 7 years ago

Welcome to node.js development 😋

From that error message it does sound like your gulpfile (which defines your build script) depends on shelljs, so installing that would be required. You could npm install shelljs, or a better idae would be to add it to your package.json devDependencies so whenever you npm install your project it will be added with it (and it's devDependencies because it's not needed to run the app itself, just for building it... doesn't really matter for these kinds of apps but it's good practice).

AlGantori commented 7 years ago

So here we go again...

$ npm install shelljs --save-dev
ionic-hello-world@ S:\_W\ARP\UPS.TS\SRC\UPS.TS.RC0
`-- shelljs@0.7.5

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\browser-sync\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

AXM@VRL MINGW64 /s/_W/ARP/UPS.TS/SRC/UPS.TS.RC0
$ ionic serve --nobrowser

Running 'serve:before' gulp task before serve
[16:41:00] Starting 'clean'...
[16:41:00] Finished 'clean' after 47 ms
[16:41:00] Starting 'watch'...
[16:41:00] Starting 'sass'...
[16:41:00] Starting 'html'...
[16:41:00] Starting 'fonts'...
[16:41:00] Starting 'scripts'...
[16:41:00] Finished 'sass' after 22 ms
[16:41:00] Finished 'html' after 12 ms
[16:41:00] Finished 'scripts' after 46 ms
[16:41:00] Finished 'fonts' after 69 ms
Caught exception:
 Error: ENOENT: no such file or directory, lstat 'S:\_W\ARP\UPS.TS\SRC\UPS.TS.RC0\app'
    at Object.fs.lstatSync (fs.js:901:18)
    at Object.realpathSync (fs.js:1531:21)
    at S:\_W\ARP\UPS.TS\SRC\UPS.TS.RC0\node_modules\tsify\index.js:58:38
    at Array.map (native)
    at DestroyableTransform.flush [as _flush] (S:\_W\ARP\UPS.TS\SRC\UPS.TS.RC0\node_modules\tsify\index.js:58:6)
    at DestroyableTransform.<anonymous> (S:\_W\ARP\UPS.TS\SRC\UPS.TS.RC0\node_modules\readable-stream\lib\_stream_transform.js:115:49)
    at DestroyableTransform.g (events.js:292:16)
    at emitNone (events.js:86:13)
    at DestroyableTransform.emit (events.js:185:7)
    at prefinish (S:\_W\ARP\UPS.TS\SRC\UPS.TS.RC0\node_modules\readable-stream\lib\_stream_writable.js:503:12)

Mind letting us know? https://github.com/driftyco/ionic-cli/issues

Give me a clue what to do next...?

MSLaguana commented 7 years ago

Did you create this project using ionic? it seems that you are missing the /app folder that they expect to be there. If you created this with RC0 and you are now using ionic RC3, you might need to go look up a migration guide and see what needs changing.

AlGantori commented 7 years ago

I did create the project while following the steps for RC0 and I never completed the steps for copying my own project files, so as far as I am concerned, this is a vanilla V2 project. It does have an app folder and it did run in the browser fine via CLI ionic serve.

At the end of my upgrade steps above, I did notice that somehow my packages.json said 2.0.0-rc.3, and I did look at the CHANGELOG and it appears that RC1, RC2 and RC3 are all about updating packages.json references, so I considered myself I am now at RC3, correct me if I am wrong.

Would you like me to create another V2 project? via ionic start --v2 Blank_RC3 Ouch that's going to be lots of files :(

AlGantori commented 7 years ago

Oh, BTW, the error says Error: ENOENT: no such file or directory, lstat 'S:_W\ARP\UPS.TS\SRC\UPS.TS.RC0\app'

Did it mean Error: ENOENT: no such file or directory, lstat 'S:_W\ARP\UPS.TS\SRC\UPS.TS.RC0\src\app'

because that's where the app folder is

AlGantori commented 7 years ago

here is my gulpfile.js could it be not compatible with RCx new source locations?

var gulp = require('gulp'),
  gulpWatch = require('gulp-watch'),
  del = require('del'),
  runSequence = require('run-sequence'),
  argv = process.argv;

var sh = require('shelljs');

/**
 * Ionic hooks
 * Add ':before' or ':after' to any Ionic project command name to run the specified
 * tasks before or after the command.
 */
gulp.task('serve:before', ['watch']);
gulp.task('emulate:before', ['build']);
gulp.task('deploy:before', ['build']);
gulp.task('build:before', ['build']);

gulp.task('default', ['sass', 'watch']);

gulp.task('serve', function (done) {
  sh.exec('ionic serve', done);
});

// we want to 'watch' when livereloading
var shouldWatch = argv.indexOf('-l') > -1 || argv.indexOf('--livereload') > -1;
gulp.task('run:before', [shouldWatch ? 'watch' : 'build']);

/**
 * Ionic Gulp tasks, for more information on each see
 * https://github.com/driftyco/ionic-gulp-tasks
 *
 * Using these will allow you to stay up to date if the default Ionic 2 build
 * changes, but you are of course welcome (and encouraged) to customize your
 * build however you see fit.
 */
var buildBrowserify = require('ionic-gulp-browserify-typescript');
var buildSass = require('ionic-gulp-sass-build');
var copyHTML = require('ionic-gulp-html-copy');
var copyFonts = require('ionic-gulp-fonts-copy');
var copyScripts = require('ionic-gulp-scripts-copy');

var isRelease = argv.indexOf('--release') > -1;

gulp.task('watch', ['clean'], function (done) {
  runSequence(
    ['sass', 'html', 'fonts', 'scripts'],
    function () {
      gulpWatch('app/**/*.scss', function () { gulp.start('sass'); });
      gulpWatch('app/**/*.html', function () { gulp.start('html'); });
      buildBrowserify({ watch: true }).on('end', done);
    }
  );
});

gulp.task('build', ['clean'], function (done) {
  runSequence(
    ['sass', 'html', 'fonts', 'scripts'],
    function () {
      buildBrowserify({
        minify: isRelease,
        browserifyOptions: {
          debug: !isRelease
        },
        uglifyOptions: {
          mangle: false
        }
      }).on('end', done);
    }
  );
});

// https://forum.ionicframework.com/t/is-it-possible-to-configure-ionic-to-copy-custom-js-files-to-the-dist-folder/46155
// my "js" code was getting deleted from build/js/ on the next "ionic serve"
gulp.task('scripts', copyScripts);

// the following does not seem to also include 
//    /build/js/es6-shim.min.js
//    /build/js/Reflect.js
//    /build/js/zone.js
// for now putting xml2json.js at root www/
//
// gulp.task('scripts', function () {
//   var options = {
//     'src': [
//       'app/js/xml2json.js'
//     ],
//     'dest': 'www/build/js'
//   };
//   return copyScripts(options);
// });

gulp.task('sass', buildSass);
gulp.task('html', copyHTML);
gulp.task('fonts', copyFonts);

gulp.task('clean', function () {
  return del('www/build');
});

// ==================================================
// https://www.browsersync.io/docs/gulp
var browserSync = require('browser-sync').create();
// var sass        = require('gulp-sass');

// Static server
gulp.task('bs', function () {
  browserSync.init({
    server: {
      baseDir: "./www/"
    }
  });
});
AlGantori commented 7 years ago

So I went ahead and made another --v2 blank project ionic serve works here is the output for --nobrowser

AXM@VRL MINGW64 /s/_W/ARP/UPS.TS/SRC/Blank.RC3
$ ionic serve --nobrowser

> ionic-hello-world@ ionic:serve S:\_W\ARP\UPS.TS\SRC\Blank.RC3
> ionic-app-scripts serve "--nobrowser"

[18:05:09]  ionic-app-scripts 0.0.45
[18:05:09]  watch started ...
[18:05:09]  build dev started ...
[18:05:09]  clean started ...
[18:05:09]  clean finished in 6 ms
[18:05:09]  copy started ...
[18:05:09]  transpile started ...
[18:05:13]  transpile finished in 3.75 s
[18:05:13]  webpack started ...
[18:05:13]  copy finished in 3.96 s
[18:05:19]  webpack finished in 5.79 s
[18:05:19]  sass started ...
[18:05:20]  sass finished in 1.58 s
[18:05:20]  build dev finished in 11.16 s
[18:05:20]  watch ready in 11.23 s
[18:05:20]  dev server running: http://localhost:8100/

I had to Ctrl-C to break out.

I think I read somewhere --nobrowser runs in the background?? I don't see any window/browser open.

so as before I open project Blank.RC3 folder in VSCode, created tasks.json via, I don't know why I did this :),

open the Command Palette with Ctrl+Shift+P 
and type in Configure Task Runner, press Enter to select it. 
This shows a selection box with templates, choose TypeScript - tsconfig.json.

Created launch.json via debug / cordova then selecting "Serve to the browser (ionic serve)" I get the same timeout I started this post about

Launching for serve (This may take a while)...
Starting Ionic dev server (live reload: true)
Starting the Ionic dev server timed out (20000 ms)

Note this project is obviously not using any Gulp I hope this is useful

MSLaguana commented 7 years ago

The output of ionic serve explains why we time out: We are expecting another line of output after the last one that appears there. The behavior of ionic may have changed, meaning we'll need to update things. Thanks for working through this with me.

AlGantori commented 7 years ago

Thanks this is reassuring I was not doing something oddly wrong :) So will the fix for this appear as a cordova-tools extension update?

BTW, I keep forgetting this is Microsoft/vscode-cordova bug tracking and not ionic2 :) I would appreciate it if you could address the following questions:

1) I am looking forward to debug to the browser again via "Serve to the browser (ionic serve)" it seems to me that's a faster workflow than going to a target device like android or simulator. I remember prior to vscode I was using chrome console and I found it terribly poor compared to an IDE, are there other alternatives that provide a quick turn around?

2) Once you launch a debug operation you can't tell if it is doing something or hung, and there is no cancel button?

3) is deleting launch.json the only way to cause VSCode to list the options

Node.js
VS Code Extension Development
Node.js v6.3 (Experimental)
Chrome
Cordova

Where can I learn if there is anything in these options that is useful for my project? From the current behavior of VSCode, it appears that they are mutually exclusive.

4) Does debug/cordova execution output a more verbose log than what appear in the vscode console? you know like an npm-debug.log file.

Did you mean cordova tools is expecting another line past the following? [18:05:20] dev server running: http://localhost:8100/

I would have no clue :)

Thank you.

AlGantori commented 7 years ago

Hello, when can we expect a fix for this?

MSLaguana commented 7 years ago

This should be fixed with the next version we publish.

AlGantori commented 7 years ago

I applied the ionic2 RC5 and RC6 updates then I updated VSCode Cordova Tools to latest 1.2.6, and thought I would try debugging from vscode, but the timeout issue is still present.

matrosov-nikita commented 7 years ago

@AlGantori , we resolve serverDeferred once we get 'dev server running: http://localhost:8100/' message from ionic dev server. By default we expect to get this message for 30s unless you specify devServerTimeout in launchConfig.json. To help diagnose the problem could you please add console.log(data.toString()) after this line and post here the output. It also would be very helpful if you share ionic-app-scripts version (if changed) since there was a bug with searching port for notification server, which was fixed in 0.48.

AlGantori commented 7 years ago

Where is cordovaDebugAdapter.ts located so I can add the line you requested.

Here is package.json

{
  "name": "ionic-hello-world",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve",
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "watch": "ionic-app-scripts watch",
    "serve:before": "watch",
    "emulate:before": "build",
    "deploy:before": "build",
    "build:before": "build",
    "run:before": "build"
  },
  "dependencies": {
    "@angular/common": "2.2.1",
    "@angular/compiler": "2.2.1",
    "@angular/compiler-cli": "2.2.1",
    "@angular/core": "2.2.1",
    "@angular/forms": "2.2.1",
    "@angular/http": "2.2.1",
    "@angular/platform-browser": "2.2.1",
    "@angular/platform-browser-dynamic": "2.2.1",
    "@angular/platform-server": "2.2.1",
    "@ionic/storage": "1.1.7",
    "browser-sync": "^2.14.0",
    "del": "2.2.1",
    "gulp": "3.9.1",
    "gulp-watch": "4.3.9",
    "ionic-angular": "2.0.0-rc.6",
    "ionic-gulp-browserify-typescript": "2.0.0",
    "ionic-gulp-fonts-copy": "^1.0.0",
    "ionic-gulp-html-copy": "^1.0.0",
    "ionic-gulp-sass-build": "^1.0.0",
    "ionic-gulp-scripts-copy": "^2.0.0",
    "ionic-native": "2.2.11",
    "ionicons": "3.0.0",
    "run-sequence": "1.2.2",
    "rxjs": "5.0.0-beta.12",
    "sw-toolbox": "3.4.0",
    "zone.js": "0.6.26"
  },
  "devDependencies": {
    "@ionic/app-scripts": "1.0.0",
    "shelljs": "^0.7.5",
    "typescript": "^2.0.10"
  },
  "cordovaPlugins": [
    "cordova-plugin-whitelist",
    "cordova-plugin-console",
    "cordova-plugin-statusbar",
    "cordova-plugin-device",
    "cordova-plugin-splashscreen",
    "ionic-plugin-keyboard"
  ],
  "cordovaPlatforms": [],
  "description": "UPS.TS.RC6: An Ionic project"
}
AlGantori commented 7 years ago

I don't have a launchConfig.json, but simply a launch.json and I used to have devServerTimeout set but not anymore

        {
            "name": "Serve to the browser (ionic serve)",
            "type": "cordova",
            "request": "launch",
            "platform": "serve",
            "cwd": "${workspaceRoot}",
            "devServerAddress": "localhost",
            "sourceMaps": true,
            "ionicLiveReload": true
        },