three doesn't exist in Angular

Vishal Sharma

Some path configuration error i am not able to solve this. Below is my package.json configuration.

    "@angular/animations": "^5.1.1",
    "@angular/cdk": "^5.0.1",
    "@angular/common": "^5.0.0",
    "@angular/compiler": "^5.0.0",
    "@angular/core": "^5.0.0",
    "@angular/forms": "^5.0.0",
    "@angular/http": "^5.0.0",
    "@angular/material": "^5.0.1",
    "@angular/platform-browser": "^5.0.0",
    "@angular/platform-browser-dynamic": "^5.0.0",
    "@angular/router": "^5.0.0",
    "@types/three": "^0.84.35",
    "animate.css": "^3.5.2",
    "bootstrap": "^3.3.7",
    "core-js": "^2.4.1",
    "d3": "^4.12.0",
    "hammerjs": "^2.0.8",
    "jquery": "^3.2.1",
    "rxjs": "^5.5.2",
    "zone.js": "^0.8.14"
  },
  "devDependencies": {
    "@angular/cli": "1.6.1",
    "@angular/compiler-cli": "^5.0.0",
    "@angular/language-service": "^5.0.0",
    "@types/d3": "^4.12.0",
    "@types/jasmine": "~2.5.53",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~6.0.60",
    "codelyzer": "^4.0.1",
    "jasmine-core": "~2.6.2",
    "jasmine-spec-reporter": "~4.1.0",
    "karma": "~1.7.0",
    "karma-chrome-launcher": "~2.1.1",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.1.2",
    "ts-node": "~3.2.0",
    "tslint": "~5.7.0",
    "typescript": "~2.4.2"


import { OnInit } from '@angular/core';
import { Component, ViewChild, ElementRef } from '@angular/core';
import * as THREE from 'three';

@Component({
  selector: 'app-home',
  templateUrl: './home.component.html',
  styleUrls: ['./home.component.css']
})
export class HomeComponent  {


  @ViewChild('rendererContainer') rendererContainer: ElementRef;
  renderer = new THREE.WebGLRenderer();

Following is the error i am getting.

 /Users/macmini05/Desktop/nieu/src/three doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              /Users/macmini05/Desktop/nieu/src/three.ts doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /Users/macmini05/Desktop/nieu/src/three.js doesn't exist
            as directory
              /Users/macmini05/Desktop/nieu/src/three doesn't exist
      looking for modules in /Users/macmini05/Desktop/nieu/src
        using description file: /Users/macmini05/Desktop/nieu/package.json (relative path: ./src)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: /Users/macmini05/Desktop/nieu/package.json (relative path: ./src)
          using description file: /Users/macmini05/Desktop/nieu/package.json (relative path: ./src/three)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /Users/macmini05/Desktop/nieu/src/three doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
              /Users/macmini05/Desktop/nieu/src/three.ts doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias 
Patryk Brejdak

Looking at your package.json you are missing three js. You have only installed @types/three which is only typings for TypeScript.

You need to install three js.

npm install three --save

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Directory doesn't exist, but it does, but it doesn't

分類Dev

MongoDB - Projecting a field that doesn't always exist

分類Dev

Append to or create StringSet if it doesn't exist

分類Dev

Deleting a subfield of a field that doesn't exist

分類Dev

Graphql Field doesn't exist on type

分類Dev

Backbone router function goto doesn't exist

分類Dev

Get node value if attribute doesn't exist

分類Dev

Contact_level__c doesn't exist

分類Dev

Adding listener to a value which doesn't exist

分類Dev

Check if session doesn't exist php

分類Dev

Check if session doesn't exist php

分類Dev

Check if string doesn't exist in List

分類Dev

function jumpTo() in owlCarousel 2.0 doesn't exist?

分類Dev

Why doesn't my subclass' variable exist?

分類Dev

new x().constructor doesn't ACTUALLY exist?

分類Dev

Name doesn't exist in current context error

分類Dev

Why doesn't `std::stringstream::stringstream(std::string&&)` exist?

分類Dev

Check if table exists and if it doesn't exist, create it in SQL Server 2008

分類Dev

Query Postgres JSONB where key doesn't exist

分類Dev

PostgreSQL + IntelliJ : FATAL : role xxx doesn't exist

分類Dev

Avoid error with cat command when src file doesn't exist

分類Dev

Return empty string if the capture group doesn't exist?

分類Dev

Recursive adding file to folder and create folder if it doesn't exist

分類Dev

Hiding element from append if value doesn't exist

分類Dev

Intune Management Extension not installing - download mirror doesn't exist

分類Dev

PostgreSQL Foreign Table Error Relation Doesn't Exist

分類Dev

headObject never throws an error when object doesn't exist

分類Dev

Add substring at beginning of string if doesn't exist (php)

分類Dev

Why clone function is working when it doesn't exist?

Related 関連記事

  1. 1

    Directory doesn't exist, but it does, but it doesn't

  2. 2

    MongoDB - Projecting a field that doesn't always exist

  3. 3

    Append to or create StringSet if it doesn't exist

  4. 4

    Deleting a subfield of a field that doesn't exist

  5. 5

    Graphql Field doesn't exist on type

  6. 6

    Backbone router function goto doesn't exist

  7. 7

    Get node value if attribute doesn't exist

  8. 8

    Contact_level__c doesn't exist

  9. 9

    Adding listener to a value which doesn't exist

  10. 10

    Check if session doesn't exist php

  11. 11

    Check if session doesn't exist php

  12. 12

    Check if string doesn't exist in List

  13. 13

    function jumpTo() in owlCarousel 2.0 doesn't exist?

  14. 14

    Why doesn't my subclass' variable exist?

  15. 15

    new x().constructor doesn't ACTUALLY exist?

  16. 16

    Name doesn't exist in current context error

  17. 17

    Why doesn't `std::stringstream::stringstream(std::string&&)` exist?

  18. 18

    Check if table exists and if it doesn't exist, create it in SQL Server 2008

  19. 19

    Query Postgres JSONB where key doesn't exist

  20. 20

    PostgreSQL + IntelliJ : FATAL : role xxx doesn't exist

  21. 21

    Avoid error with cat command when src file doesn't exist

  22. 22

    Return empty string if the capture group doesn't exist?

  23. 23

    Recursive adding file to folder and create folder if it doesn't exist

  24. 24

    Hiding element from append if value doesn't exist

  25. 25

    Intune Management Extension not installing - download mirror doesn't exist

  26. 26

    PostgreSQL Foreign Table Error Relation Doesn't Exist

  27. 27

    headObject never throws an error when object doesn't exist

  28. 28

    Add substring at beginning of string if doesn't exist (php)

  29. 29

    Why clone function is working when it doesn't exist?

ホットタグ

アーカイブ