Skip to content

NG new Typings Error #1092

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

Closed
RicardoVaranda opened this issue Jun 15, 2016 · 8 comments · Fixed by #1121
Closed

NG new Typings Error #1092

RicardoVaranda opened this issue Jun 15, 2016 · 8 comments · Fixed by #1121
Labels
P0 Issue that causes an outage, breakage, or major function to be unusable, with no known workarounds type: bug/fix

Comments

@RicardoVaranda
Copy link
Contributor

Please provide us with the following information:

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
    Ubuntu 16.04
  1. Versions. Please run ng --version. If there's nothing outputted, please
    run in a Terminal:
    node --version
    And paste the result here.
    angular-cli: 1.0.0-beta.6
    node: 6.2.1
    os: linux x64
  2. Repro steps. Was this an app that wasn't created using the CLI? What change did you
    do on your code? etc.
    ng new TestApp
  3. The log given by the failure. Normally this include a stack trace and some
    more information.
ricardo@Ricardo:~/WebstormProjects/temp$ ng new MyApp
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
installing ng2
  create .editorconfig
  create README.md
  create src/app/app.component.css
  create src/app/app.component.html
  create src/app/app.component.spec.ts
  create src/app/app.component.ts
  create src/app/environment.ts
  create src/app/index.ts
  create src/app/shared/index.ts
  create src/favicon.ico
  create src/index.html
  create src/main.ts
  create src/system-config.ts
  create src/tsconfig.json
  create src/typings.d.ts
  create angular-cli-build.js
  create angular-cli.json
  create config/environment.dev.ts
  create config/environment.js
  create config/environment.prod.ts
  create config/karma-test-shim.js
  create config/karma.conf.js
  create config/protractor.conf.js
  create e2e/app.e2e-spec.ts
  create e2e/app.po.ts
  create e2e/tsconfig.json
  create e2e/typings.d.ts
  create .gitignore
  create package.json
  create public/.npmignore
  create tslint.json
  create typings.json
Successfully initialized git.
⠼ Installing packages for tooling via npmsh: 1: typings: not found
File: sh
@angular/[email protected] postinstall: `typings install`
spawn ENOENT
Error: @angular/[email protected] postinstall: `typings install`
spawn ENOENT
    at ChildProcess.<anonymous> (/home/ricardo/.npm-global/lib/node_modules/angular-cli/node_modules/npm/lib/utils/spawn.js:17:16)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:852:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)

  1. Mention any other details that might be useful.

    Thanks! We'll be in touch soon.

@RicardoVaranda
Copy link
Contributor Author

RicardoVaranda commented Jun 15, 2016

As an extra bit of information, I do have typings installed:

ricardo@Ricardo:~/WebstormProjects/temp$ typings

Usage: typings <command>

Commands:
    bundle, i, in, info, init, install, la, list, ll, ls, open, prune, r,
    remove, rm, search, uninstall, view

typings <command> -h   Get help for <command>
typings <command> -V   Enable verbose logging

typings --version      Print the CLI version

[email protected] /home/ricardo/.npm-global/lib/node_modules/typings

EDIT:
If I run the following command:
npm run postinstall

It seems to install just fine.

@Chowarmaan
Copy link

Windows 7 gives me a slightly different error, but the main cause is the same. This is a clean install of Node 6.2.1 with npm 3.9.3. Installed Node, then npm install -g angular-cli

Command
ng new TestApp
...
create tslint.json
create typings.json
Successfully initialized git.

  • Installing packages for tooling via npm'typings' is not recognized as an internal or external command,
    operable program or batch file.
    @angular/[email protected] postinstall: typings install
    Exit status 1
    Error: @angular/[email protected] postinstall: typings install
    Exit status 1
    at EventEmitter. (C:\Users\stevens\AppData\Roaming\npm\node_modul
    es\angular-cli\node_modules\npm\lib\utils\lifecycle.js:217:16)
    at emitTwo (events.js:106:13)
    at EventEmitter.emit (events.js:191:7)
    at ChildProcess. (C:\Users\stevens\AppData\Roaming\npm\node_modul
    es\angular-cli\node_modules\npm\lib\utils\spawn.js:24:14)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:852:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)

Running ng --version gives error:
module.js:442
throw err;
^

Error: Cannot find module 'ember-cli/lib/utilities/find-build-file'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object. (C:\Users\stevens\Development\AgentUI\node_modules\ang
ular-cli\lib\cli\index.js:48:31)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)

All ng (ng --version, ng serve, ng test) return the same error. Everything was installed under npm in the Windows Command window running as an Administrator with the shortcut being executed as Run as Adminstrator from the right click menu.

@Blasz
Copy link

Blasz commented Jun 16, 2016

I'm also getting this error when upgrading my existing repo from beta.5 to beta.6 following the update guide. I'm unsure how to proceed.

OS: Ubuntu 14.04
Versions:

$ ng --version
(node:24736) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
angular-cli: 1.0.0-beta.6
node: 6.2.1
os: linux x64

Output:

$ ng init
(node:24472) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
installing ng2
? Overwrite .editorconfig? Diff

  ...

  overwrite package.json
  identical public/.npmignore
  overwrite tslint.json
  identical typings.json
⠴ Installing packages for tooling via npmsh: 1: typings: not found
File: sh
@angular/[email protected] postinstall: `typings install`
spawn ENOENT
Error: @angular/[email protected] postinstall: `typings install`
spawn ENOENT
    at ChildProcess.<anonymous> (/home/vagrant/ng2-widgets/node_modules/angular-cli/node_modules/npm/lib/utils/spawn.js:17:16)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:852:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)

@JoshWilliams92
Copy link

JoshWilliams92 commented Jun 16, 2016

Hi Blasz,

I was having a similar issue on Ubuntu when I ran ng serve so I downloaded Windows 10 instead and still encountered the same problem. After all that, I realised it's definitely an issue with the CLI and not the desktop. The CLI is still in beta and it's also something to do with running the latest version of node v6 2.1. I'm building the boilerplate from scratch now on the main angular.io docs but it would be good to use angular material with it which I currently cannot do.

@filipesilva
Copy link
Contributor

I'm looking into this now.

@filipesilva filipesilva added type: bug/fix P0 Issue that causes an outage, breakage, or major function to be unusable, with no known workarounds labels Jun 16, 2016
@filipesilva
Copy link
Contributor

filipesilva commented Jun 16, 2016

This is a reported issue with the @angular/[email protected].* router: https://github.com/angular/vladivostok/issues/49.

It will need an upgrade of that project to fix the error, and we'll make a new CLI release including that and rc2.

Meanwhile I only have two solutions to the issue:

  • Have typings installed globally npm install -g typings@latest OR
  • Remove @angular/[email protected] from the generate project's package.json and re-run npm install.

@Chowarmaan
Copy link

Installing Typings globally, and then running in the GIT BASH shell fixed my issue

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P0 Issue that causes an outage, breakage, or major function to be unusable, with no known workarounds type: bug/fix
Projects
None yet
5 participants