Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error is: Unexpected token ). Executing after-watch hook #307

Open
moorthi07 opened this issue May 14, 2018 · 3 comments
Open

Error is: Unexpected token ). Executing after-watch hook #307

moorthi07 opened this issue May 14, 2018 · 3 comments

Comments

@moorthi07
Copy link

moorthi07 commented May 14, 2018

After cloning,
tns run android
throws this error:

Unable to apply changes on device: emulator-5554. Error is: Unexpected token ).
Executing after-watch hook from C:\demo_tutorials\sample-Groceries\hooks\after-watch\nativescript-dev-typescript.js

tns doctor
NOTE: You can develop for iOS only on Mac OS X systems.
To be able to work with iOS devices and projects, you need Mac OS X Mavericks or later.

Updates available
┌──────────────┬─────────────────┬────────────────┬──────────────────┐
│ Component │ Current version │ Latest version │ Information │
│ nativescript │ 3.4.0 │ 4.0.1 │ Update available │
│ tns-android │ 4.0.0 │ 4.0.1 │ Update available │
└──────────────┴─────────────────┴────────────────┴──────────────────┘

No issues were detected.

@moorthi07
Copy link
Author

moorthi07 commented May 14, 2018

Same problem with nativescript-sdk-examples-ng.
Executing after-watch hook from C:\demo_tutorials\nativescript-sdk-examples-ng\hooks\after-watch\nativescript-dev-webpack.js
Unexpected token )
-# run android

@moorthi07
Copy link
Author

moorthi07 commented May 14, 2018

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.1.2 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules@angular\compiler-cli\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN [email protected] requires a peer of tns-core-modules@^4.0.0 || >4.0.0- || >4.1.0- but none was installed.
npm WARN [email protected] requires a peer of webpack@^3.1.0 but none was installed.
npm WARN [email protected] requires a peer of @angular/compiler@^2.3.1 || >=4.0.0-beta <5.0.0 but none was
installed.
npm WARN [email protected] requires a peer of @angular/core@^2.3.1 || >=4.0.0-beta <5.0.0 but none was installed.
npm WARN [email protected] requires a peer of webpack@^2.0.0 || ^3.0.0 but none was installed.
npm WARN [email protected] requires a peer of ajv@^5.0.0 but none was installed.

C:\demo_tutorials\nativescript-sdk-examples-ng>tns run android
Searching for devices...
Executing before-liveSync hook from C:\demo_tutorials\nativescript-sdk-examples-ng\hooks\before-liveSync\nativescript-angular-sync.js
Copying template files...
Installing tns-android
/ Installing tns-android[ ...........] / loadRequestedDeps: verb afterAdd C:\Users\sendur\AppData \ Installing tns-android[ ..........] \ fetchMetadata: verb afterAdd C:\Users\sendur\AppData\[email protected] C:\demo_tutorials\nativescript-sdk-examples-ng
+-- UNMET PEER DEPENDENCY @angular/[email protected]
+-- UNMET PEER DEPENDENCY @angular/[email protected]
+-- [email protected]
+-- UNMET PEER DEPENDENCY [email protected]
`-- UNMET PEER DEPENDENCY [email protected]

Project successfully created.
Executing before-prepare hook from C:\demo_tutorials\nativescript-sdk-examples-ng\hooks\before-prepare\nativescript-dev-typescript.js
Found peer TypeScript 2.7.2
Preparing project...
Executing before-prepareJSApp hook from C:\demo_tutorials\nativescript-sdk-examples-ng\hooks\before-prepareJSApp\nativescript-dev-webpack.js
Unable to apply changes on device: emulator-5554. Error is: Unexpected token ).
Executing after-watch hook from C:\demo_tutorials\nativescript-sdk-examples-ng\hooks\after-watch\nativescript-dev-typescript.js
Executing after-watch hook from C:\demo_tutorials\nativescript-sdk-examples-ng\hooks\after-watch\nativescript-dev-webpack.js
Unexpected token )
..# run android

@moorthi07
Copy link
Author

tns should build with local version of angular . In this case , it looks like it is picking up ng 6.0 from global as opposed to 5.0 in the local.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant