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

Unable to start dev-app with npm/yarn #18166

Closed
ElecTreeFrying opened this issue Jan 14, 2020 · 4 comments
Closed

Unable to start dev-app with npm/yarn #18166

ElecTreeFrying opened this issue Jan 14, 2020 · 4 comments

Comments

@ElecTreeFrying
Copy link

@ElecTreeFrying ElecTreeFrying commented Jan 14, 2020

What are you trying to do?

I'm trying to run dev-app in npm/yarn.

What troubleshooting steps have you tried?

Here's the error logging upon npm run dev-app.

I tried restarting my pc, reinstalling nodejs yarn. but the errors still the same. I cant start dev-app.

I also posted my issue here. https://groups.google.com/forum/#!topic/angular-material2/Qzg9Ofea7Ic

PS C:\Atom\Angular\components> npm run dev-app                                                                                                                     
> components-srcs@9.0.0-rc.6 dev-app C:\Atom\Angular\components
> ibazel run //src/dev-app:devserver

Querying for files to watch...
)) was unexpected at this time.
Bazel query failed: exit status 255
INFO: Writing tracer profile to 'C:/users/jjger/_bazel_jjger/ahuabkcd/command.profile.gz'
Loading: 0 packages loaded
ERROR: error loading package 'src/dev-app': in C:/atom/angular/components/tools/defaults.bzl: in C:/users/jjger/_bazel_jjger/ahuabkcd/external/npm_angular_bazel/index.bzl: in C:/users/jjger/_bazel_jjger/ahuabkcd/external/npm_angular_bazel/src/ng_package/ng_package.bzl: Label '@build_bazel_rules_nodejs//internal/npm_package:npm_package.bzl' is invalid because 'internal/npm_package' is not a package; perhaps you meant to put the colon here: '@build_bazel_rules_nodejs//internal:npm_package/npm_package.bzl'?
Loading: 1 packages loaded
Loading: 1 packages loaded
Bazel query failed: exit status 7
Runing //src/dev-app:devserver
INFO: Writing tracer profile to 'C:/users/jjger/_bazel_jjger/ahuabkcd/command.profile.gz'
Loading: 0 packages loaded
ERROR: error loading package 'src/dev-app': in C:/atom/angular/components/tools/defaults.bzl: in C:/users/jjger/_bazel_jjger/ahuabkcd/external/npm_angular_bazel/index.bzl: in C:/users/jjger/_bazel_jjger/ahuabkcd/external/npm_angular_bazel/src/ng_package/ng_package.bzl: Label '@build_bazel_rules_nodejs//internal/npm_package:npm_package.bzl' is invalid because 'internal/npm_package' is not a package; perhaps you meant to put the colon here: '@build_bazel_rules_nodejs//internal:npm_package/npm_package.bzl'?
Loading: 1 packages loaded
Loading: 1 packages loaded
Error running Bazel exit status 7
npm ERR! code ELIFECYCLE
npm ERR! errno 4
npm ERR! components-srcs@9.0.0-rc.6 dev-app: `ibazel run //src/dev-app:devserver`
npm ERR! Exit status 4
npm ERR!
npm ERR! Failed at the components-srcs@9.0.0-rc.6 dev-app script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     [C:\Users\jjger\AppData\Roaming\npm-cache\_logs\2020-01-14T01_54_33_569Z-debug.log](url)

C:\Users\jjger\AppData\Roaming\npm-cache_logs\2020-01-14T01_54_33_569Z-debug.log

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\jjger\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'dev-app'
1 verbose cli ]
2 info using npm@6.13.4
3 info using node@v12.14.0
4 verbose run-script [ 'predev-app', 'dev-app', 'postdev-app' ]
5 info lifecycle components-srcs@9.0.0-rc.6~predev-app: components-srcs@9.0.0-rc.6
6 info lifecycle components-srcs@9.0.0-rc.6~dev-app: components-srcs@9.0.0-rc.6
7 verbose lifecycle components-srcs@9.0.0-rc.6~dev-app: unsafe-perm in lifecycle true
8 verbose lifecycle components-srcs@9.0.0-rc.6~dev-app: PATH: C:\Users\jjger\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Atom\Angular\components\node_modules\.bin;C:\Python27\;C:\Python27\Scripts;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\WINDOWS\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\Program Files\PowerShell\7-preview\preview;C:\Program Files\AdoptOpenJDK\jdk8u192-b12\bin;C:\Program Files\Java\jdk1.8.0_231\bin;C:\Android\android-sdk\tools;C:\Android\android-sdk\platform-tools;C:\Android\android-sdk\tools\bin;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Program Files (x86)\Yarn\bin\;C:\Ruby26-x64\bin;C:\Users\jjger\AppData\Local\Microsoft\WindowsApps;C:\Users\jjger\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\jjger\AppData\Local\atom\bin;C:\Users\jjger\AppData\Roaming\npm;C:\Users\jjger\AppData\Local\Yarn\bin;C:\Program Files (x86)\GnuWin32\bin\patch.exe;C:\Program Files (x86)\GnuWin32\bin;
9 verbose lifecycle components-srcs@9.0.0-rc.6~dev-app: CWD: C:\Atom\Angular\components
10 silly lifecycle components-srcs@9.0.0-rc.6~dev-app: Args: [ '/d /s /c', 'ibazel run //src/dev-app:devserver' ]
11 silly lifecycle components-srcs@9.0.0-rc.6~dev-app: Returned: code: 4  signal: null
12 info lifecycle components-srcs@9.0.0-rc.6~dev-app: Failed to exec dev-app script
13 verbose stack Error: components-srcs@9.0.0-rc.6 dev-app: `ibazel run //src/dev-app:devserver`
13 verbose stack Exit status 4
13 verbose stack     at EventEmitter.<anonymous> (C:\Users\jjger\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:210:5)
13 verbose stack     at ChildProcess.<anonymous> (C:\Users\jjger\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:210:5)
13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid components-srcs@9.0.0-rc.6
15 verbose cwd C:\Atom\Angular\components
16 verbose Windows_NT 10.0.18363
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\jjger\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev-app"
18 verbose node v12.14.0
19 verbose npm  v6.13.4
20 error code ELIFECYCLE
21 error errno 4
22 error components-srcs@9.0.0-rc.6 dev-app: `ibazel run //src/dev-app:devserver`
22 error Exit status 4
23 error Failed at the components-srcs@9.0.0-rc.6 dev-app script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 4, true ]

Reproduction

Steps to reproduce:

  1. clone https://github.com/angular/components.git
  2. yarn install / npm install
  3. yarn run dev-app / npm run dev-app

Environment

  • Angular: v8.3.21
  • CDK/Material: v9.0.0-rc.7
  • Node.js: v12.14.0
  • npm: v6.13.4
  • Yarn: 1.21.1
  • Browser(s): Chrome 79
  • Operating System: Win10
@ElecTreeFrying ElecTreeFrying changed the title Unable to run dev-app with npm/yarn Unable to start dev-app with npm/yarn Jan 14, 2020
@Splaktar

This comment has been minimized.

Copy link
Member

@Splaktar Splaktar commented Jan 14, 2020

Have you tried removing node_modules and then trying the following with Yarn only (you shouldn't mix Yarn and NPM in the same repo):

  1. yarn
  2. yarn dev-app
@ElecTreeFrying

This comment has been minimized.

Copy link
Author

@ElecTreeFrying ElecTreeFrying commented Jan 14, 2020

Have you tried removing node_modules and then trying the following with Yarn only (you shouldn't mix Yarn and NPM in the same repo):

  1. yarn
  2. yarn dev-app

Thanks @Splaktar !

I don't know what happened. I used git cli this time. Freshly cloned the git. Entered yarn and yarn dev-app and now its working! asdflkajsdhfalsdjf

  1. git clone https://github.com/angular/components.git
  2. cd components
  3. yarn
  4. yan dev-app

Yesterday I was using powershell and this error happened. using this commands. haven't tried this with cmd

  1. git clone https://github.com/angular/components.git
  2. cd components
  3. yarn install
  4. yan run dev-app

I repeated the process using powershell again with this commands. still an error. haven't tried this with cmd

  1. git clone https://github.com/angular/components.git
  2. cd components
  3. yarn
  4. yan dev-app
@ElecTreeFrying

This comment has been minimized.

Copy link
Author

@ElecTreeFrying ElecTreeFrying commented Jan 14, 2020

yarn dev-app / yarn run dev-app works only with git cli

doesn't work with my powershell or cmd. maybe this was because on how i installed git on my laptop.

@Splaktar

This comment has been minimized.

Copy link
Member

@Splaktar Splaktar commented Jan 14, 2020

We have a number of scripts that are bash, so Git Bash shell, WSL shell, or Cygwin Bash are supported. Cmd and PowerShell won't really work (there may be a way to modify them to work, but it's not documented AFAIK).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.