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

npm install fails with check-engines: command not found #6

Closed
mikesimmonds opened this issue Oct 18, 2018 · 3 comments
Closed

npm install fails with check-engines: command not found #6

mikesimmonds opened this issue Oct 18, 2018 · 3 comments

Comments

@mikesimmonds
Copy link

When trying to install ngentest via npm the install fails.

The npm error log is below:

`➜ ~ npm install ngentest -g

ngentest@0.3.0 preinstall /Users/***/.nvm/versions/node/v10.5.0/lib/node_modules/ngentest
check-engines

sh: check-engines: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! ngentest@0.3.0 preinstall: check-engines
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the ngentest@0.3.0 preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.`

@allenhwkim
Copy link
Owner

Thanks for the reporting. This is fixed with 0.3.2 version

@mtsdesign
Copy link

Thanks for the quick response!

@allenhwkim
Copy link
Owner

Closing this. Now it's 0.3.3 with more robust code generation. For example,

// tslint:disable
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { Injectable, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { isPlatformBrowser } from '@angular/common';
import { By } from '@angular/platform-browser';
import { Observagle } from 'rxjs/Observable';
import 'rxjs/add/observable/of';
import 'rxjs/add/observable/throw';

import {Component, Directive, Inject, PLATFORM_ID} from '@angular/core';
import {AppComponent} from './my.component';
import {AuthGuardService} from './common/app-common.module';
import {CookieService} from './common/services/cookie.service';
import {AppLoadService} from './framework/app-load.service';
import {AgentHeaderDataService} from './common/services/agent-header-data.service';
import {Router} from '@angular/router';
import {CommonUtilsService} from './common/services/common-utils.service';
import {DeeplinkService} from './common/services/deeplink.service';

@Injectable()
class MockAuthGuardService { }
      
@Injectable()
class MockCookieService { }
      
@Injectable()
class MockAppLoadService { }
      
@Injectable()
class MockAgentHeaderDataService { }
      
@Injectable();
class MockRouter { navigate = jest.fn(); }
      
@Injectable()
class MockCommonUtilsService { }
      
@Injectable()
class MockDeeplinkService { }
      
describe('AppComponent', () => {
  let fixture;
  let component;

  beforeEach(() => {
    TestBed.configureTestingModule({
      declarations: [
        AppComponent
      ],
      providers: [
        {provide: AuthGuardService, useClass: MockAuthGuardService},
        {provide: CookieService, useClass: MockCookieService},
        {provide: AppLoadService, useClass: MockAppLoadService},
        {provide: AgentHeaderDataService, useClass: MockAgentHeaderDataService},
        {provide: PLATFORM_ID,useValue: 'browser'},
        {provide: Router, useClass: MockRouter},
        {provide: CommonUtilsService, useClass: MockCommonUtilsService},
        {provide: DeeplinkService, useClass: MockDeeplinkService},
      ],
      schemas: [ CUSTOM_ELEMENTS_SCHEMA ]
    }).compileComponents();
    fixture = TestBed.createComponent(AppComponent);
    component = fixture.debugElement.componentInstance;
  });

  it('should create a component', async () => {
    expect(component).toBeTruthy();
  });
 
   ...

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

3 participants