Implementing a TensorFlow.js model into an app with node.js
Opened this issue · 0 comments
I am working on a project where I am using Ionic and TensorFlow for machine learning. I have converted my TensorFlow model to a tensorflowjs model. I have put the model.json file and shard files of the tensorflowjs model in the assets folder in Ionic. Basically, I have put my tensorflowjs model in the assets folder of ionic. I am wanting to use Capacitor to access the camera and allow users to take photos. Then, the photos will be passed to the tensorflowjs model in assets to get and display a prediction for that user.
Here is my typescript code:
import { Component, OnInit, ViewChild, ElementRef, Renderer2 } from '@angular/core';
import { Plugins, CameraResultType, CameraSource} from '@capacitor/core';
import { DomSanitizer, SafeResourceUrl} from '@angular/platform-browser';
import { Platform } from '@ionic/angular';
import { rendererTypeName } from '@angular/compiler';
import { Base64 } from '@ionic-native/base64/ngx';
import { defineCustomElements } from '@ionic/pwa-elements/loader';
import { Buffer } from 'buffer';
import * as tf from '@tensorflow/tfjs';
import * as tr from '@tensorflow/tfjs-node';
const { Camera } = Plugins;
@component({
selector: 'app-predict',
templateUrl: 'predict.page.html',
styleUrls: ['predict.page.scss'],
})
export class PredictPage {
linearModel : tf.Sequential;
prediction : any;
InputTaken : any;
ctx: CanvasRenderingContext2D;
pos = { x: 0, y: 0 };
canvasElement : any;
photo: SafeResourceUrl;
model: tf.LayersModel;
constructor(private sanitizer: DomSanitizer)
{}
ngOnInit(){
this.loadModel();
}
async loadModel(){
this.model = await tf.loadLayersModel('/assets/model.json');
}
async takePicture() {
const image = await Camera.getPhoto({
quality: 90,
allowEditing: true,
resultType: CameraResultType.Uri,
source: CameraSource.Camera});
this.photo = this.sanitizer.bypassSecurityTrustResourceUrl(image.base64String);
defineCustomElements(window);
const b = Buffer.from(image.base64String, 'base64')
// get the tensor
const imr = tr.node.decodeImage(b)
// Compute the output
const output = this.model.predict(imr) as any;
}
}
In this code, I have imported the necessary tools. Then, I have my constructor function and a takepicture() function. In the takepicture function, I have included functionality for the user to take pictures. Then, I converted the image to a tensor. I am passing the picture taken to the tensorflowjs model in this line of code:
// Compute the output
const output = this.model.predict(imr) as any;
However, I am receving a very long error related to @tensorflow/tfjs-node. It would be helpful if someone pointed out why I am receiving this error as there are not many helpful resources online that I have found. Here is an excerpt of the error:
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules\net.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\node_modules\net.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\node_modules\net.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules\net.js doesn't exist
as directory
C:\Users\isusu\Documents\third\myApp\node_modules\net doesn't exist
C:\Users\isusu\node_modules\net.js doesn't exist
as directory
C:\Users\isusu\node_modules\net doesn't exist
C:\Users\isusu\Documents\third\node_modules\net.js doesn't exist
as directory
C:\Users\isusu\Documents\third\node_modules\net doesn't exist
[C:\Users\isusu\Documents\third\myApp\net]
[C:\Users\isusu\Documents\third\myApp\net.ts]
[C:\Users\isusu\Documents\third\myApp\net.tsx]
[C:\Users\isusu\Documents\third\myApp\net.mjs]
[C:\Users\isusu\Documents\third\myApp\net.js]
[C:\Users\isusu\Documents\third\myApp\node_modules\forever-agent\node_modules]
[C:\Users\isusu\Documents\third\myApp\node_modules\node_modules]
[C:\Users\isusu\Documents\node_modules]
[C:\Users\node_modules]
[C:\node_modules]
[C:\Users\isusu\node_modules\package.json]
[C:\Users\isusu\Documents\third\node_modules\package.json]
[C:\Users\isusu\node_modules\net\package.json]
[C:\Users\isusu\Documents\third\node_modules\net\package.json]
[C:\Users\isusu\Documents\third\myApp\node_modules\net]
[C:\Users\isusu\node_modules\net]
[C:\Users\isusu\Documents\third\node_modules\net]
[C:\Users\isusu\Documents\third\myApp\node_modules\net.ts]
[C:\Users\isusu\node_modules\net.ts]
[C:\Users\isusu\Documents\third\node_modules\net.ts]
[C:\Users\isusu\Documents\third\myApp\node_modules\net.tsx]
[C:\Users\isusu\node_modules\net.tsx]
[C:\Users\isusu\Documents\third\node_modules\net.tsx]
[C:\Users\isusu\Documents\third\myApp\node_modules\net.mjs]
[C:\Users\isusu\node_modules\net.mjs]
[C:\Users\isusu\Documents\third\node_modules\net.mjs]
[C:\Users\isusu\Documents\third\myApp\node_modules\net.js]
[C:\Users\isusu\node_modules\net.js]
[C:\Users\isusu\Documents\third\node_modules\net.js]
@ ./node_modules/forever-agent/index.js 6:10-24
@ ./node_modules/request/request.js
@ ./node_modules/request/index.js
@ ./node_modules/@tensorflow/tfjs-node/node_modules/node-pre-gyp/lib/install.js
@ ./node_modules/@tensorflow/tfjs-node/node_modules/node-pre-gyp/lib sync ^./.*$
@ ./node_modules/@tensorflow/tfjs-node/node_modules/node-pre-gyp/lib/node-pre-gyp.js
@ ./node_modules/@tensorflow/tfjs-node/dist/index.js
@ ./src/app/predict/predict.page.ts
@ ./src/app/predict/predict-routing.module.ts
@ ./src/app/predict/predict.module.ts
@ ./src/app/app-routing.module.ts
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi ./src/main.ts
ERROR in ./node_modules/tough-cookie/lib/cookie.js
Module not found: Error: Can't resolve 'net' in 'C:\Users\isusu\Documents\third\myApp\node_modules\tough-cookie\lib'
resolve 'net' in 'C:\Users\isusu\Documents\third\myApp\node_modules\tough-cookie\lib'
Parsed request is a module
using description file: C:\Users\isusu\Documents\third\myApp\node_modules\tough-cookie\package.json (relative path: ./lib)
Field 'browser' doesn't contain a valid alias configuration
resolve as module
looking for modules in C:/Users/isusu/Documents/third/myApp
using description file: C:\Users\isusu\Documents\third\myApp\package.json (relative path: .)
Field 'browser' doesn't contain a valid alias configuration
using description file: C:\Users\isusu\Documents\third\myApp\package.json (relative path: ./net)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\net doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\net.ts doesn't exist
.tsx
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\net.tsx doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\net.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\net.js doesn't exist
as directory
C:\Users\isusu\Documents\third\myApp\net doesn't exist
C:\Users\isusu\Documents\third\myApp\node_modules\tough-cookie\lib\node_modules doesn't exist or is not a directory
C:\Users\isusu\Documents\third\myApp\node_modules\tough-cookie\node_modules doesn't exist or is not a directory
C:\Users\isusu\Documents\third\myApp\node_modules\node_modules doesn't exist or is not a directory
C:\Users\isusu\Documents\node_modules doesn't exist or is not a directory
C:\Users\node_modules doesn't exist or is not a directory
C:\node_modules doesn't exist or is not a directory
looking for modules in C:\Users\isusu\Documents\third\myApp\node_modules
using description file: C:\Users\isusu\Documents\third\myApp\package.json (relative path: ./node_modules)
Field 'browser' doesn't contain a valid alias configuration
looking for modules in C:\Users\isusu\node_modules
No description file found
Field 'browser' doesn't contain a valid alias configuration
looking for modules in C:\Users\isusu\Documents\third\node_modules
No description file found
Field 'browser' doesn't contain a valid alias configuration
No description file found
No description file found
using description file: C:\Users\isusu\Documents\third\myApp\package.json (relative path: ./node_modules/net)
no extension
Field 'browser' doesn't contain a valid alias configuration
no extension
Field 'browser' doesn't contain a valid alias configuration
no extension
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules\net doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\node_modules\net doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\node_modules\net doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules\net.ts doesn't exist
.tsx
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\node_modules\net.ts doesn't exist
.tsx
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\node_modules\net.ts doesn't exist
.tsx
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules\net.tsx doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\node_modules\net.tsx doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\node_modules\net.tsx doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules\net.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\node_modules\net.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\node_modules\net.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules\net.js doesn't exist
as directory
C:\Users\isusu\Documents\third\myApp\node_modules\net doesn't exist
C:\Users\isusu\node_modules\net.js doesn't exist
as directory
C:\Users\isusu\node_modules\net doesn't exist
C:\Users\isusu\Documents\third\node_modules\net.js doesn't exist
as directory
C:\Users\isusu\Documents\third\node_modules\net doesn't exist
[C:\Users\isusu\Documents\third\myApp\net]
[C:\Users\isusu\Documents\third\myApp\net.ts]
[C:\Users\isusu\Documents\third\myApp\net.tsx]
[C:\Users\isusu\Documents\third\myApp\net.mjs]
[C:\Users\isusu\Documents\third\myApp\net.js]
[C:\Users\isusu\Documents\third\myApp\node_modules\tough-cookie\lib\node_modules]
[C:\Users\isusu\Documents\third\myApp\node_modules\tough-cookie\node_modules]
[C:\Users\isusu\Documents\third\myApp\node_modules\node_modules]
[C:\Users\isusu\Documents\node_modules]
[C:\Users\node_modules]
[C:\node_modules]
[C:\Users\isusu\node_modules\package.json]
[C:\Users\isusu\Documents\third\node_modules\package.json]
[C:\Users\isusu\node_modules\net\package.json]
[C:\Users\isusu\Documents\third\node_modules\net\package.json]
[C:\Users\isusu\Documents\third\myApp\node_modules\net]
[C:\Users\isusu\node_modules\net]
[C:\Users\isusu\Documents\third\node_modules\net]
[C:\Users\isusu\Documents\third\myApp\node_modules\net.ts]
[C:\Users\isusu\node_modules\net.ts]
[C:\Users\isusu\Documents\third\node_modules\net.ts]
[C:\Users\isusu\Documents\third\myApp\node_modules\net.tsx]
[C:\Users\isusu\node_modules\net.tsx]
[C:\Users\isusu\Documents\third\node_modules\net.tsx]
[C:\Users\isusu\Documents\third\myApp\node_modules\net.mjs]
[C:\Users\isusu\node_modules\net.mjs]
[C:\Users\isusu\Documents\third\node_modules\net.mjs]
[C:\Users\isusu\Documents\third\myApp\node_modules\net.js]
[C:\Users\isusu\node_modules\net.js]
[C:\Users\isusu\Documents\third\node_modules\net.js]
@ ./node_modules/tough-cookie/lib/cookie.js 32:10-24
@ ./node_modules/request/lib/cookies.js
@ ./node_modules/request/index.js
@ ./node_modules/@tensorflow/tfjs-node/node_modules/node-pre-gyp/lib/install.js
@ ./node_modules/@tensorflow/tfjs-node/node_modules/node-pre-gyp/lib sync ^./.*$
@ ./node_modules/@tensorflow/tfjs-node/node_modules/node-pre-gyp/lib/node-pre-gyp.js
@ ./node_modules/@tensorflow/tfjs-node/dist/index.js
@ ./src/app/predict/predict.page.ts
@ ./src/app/predict/predict-routing.module.ts
@ ./src/app/predict/predict.module.ts
@ ./src/app/app-routing.module.ts
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi ./src/main.ts
ERROR in ./node_modules/tunnel-agent/index.js
Module not found: Error: Can't resolve 'net' in 'C:\Users\isusu\Documents\third\myApp\node_modules\tunnel-agent'
resolve 'net' in 'C:\Users\isusu\Documents\third\myApp\node_modules\tunnel-agent'
Parsed request is a module
using description file: C:\Users\isusu\Documents\third\myApp\node_modules\tunnel-agent\package.json (relative path: .)
Field 'browser' doesn't contain a valid alias configuration
resolve as module
looking for modules in C:/Users/isusu/Documents/third/myApp
using description file: C:\Users\isusu\Documents\third\myApp\package.json (relative path: .)
Field 'browser' doesn't contain a valid alias configuration
using description file: C:\Users\isusu\Documents\third\myApp\package.json (relative path: ./net)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\net doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\net.ts doesn't exist
.tsx
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\net.tsx doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\net.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\net.js doesn't exist
as directory
C:\Users\isusu\Documents\third\myApp\net doesn't exist
C:\Users\isusu\Documents\third\myApp\node_modules\tunnel-agent\node_modules doesn't exist or is not a directory
C:\Users\isusu\Documents\third\myApp\node_modules\node_modules doesn't exist or is not a directory
C:\Users\isusu\Documents\node_modules doesn't exist or is not a directory
C:\Users\node_modules doesn't exist or is not a directory
C:\node_modules doesn't exist or is not a directory
looking for modules in C:\Users\isusu\Documents\third\myApp\node_modules
using description file: C:\Users\isusu\Documents\third\myApp\package.json (relative path: ./node_modules)
Field 'browser' doesn't contain a valid alias configuration
looking for modules in C:\Users\isusu\node_modules
No description file found
Field 'browser' doesn't contain a valid alias configuration
looking for modules in C:\Users\isusu\Documents\third\node_modules
No description file found
Field 'browser' doesn't contain a valid alias configuration
No description file found
No description file found
using description file: C:\Users\isusu\Documents\third\myApp\package.json (relative path: ./node_modules/net)
no extension
Field 'browser' doesn't contain a valid alias configuration
no extension
Field 'browser' doesn't contain a valid alias configuration
no extension
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules\net doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\node_modules\net doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\node_modules\net doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules\net.ts doesn't exist
.tsx
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\node_modules\net.ts doesn't exist
.tsx
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\node_modules\net.ts doesn't exist
.tsx
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules\net.tsx doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\node_modules\net.tsx doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\node_modules\net.tsx doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules\net.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\node_modules\net.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\node_modules\net.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules\net.js doesn't exist
as directory
C:\Users\isusu\Documents\third\myApp\node_modules\net doesn't exist
C:\Users\isusu\node_modules\net.js doesn't exist
as directory
C:\Users\isusu\node_modules\net doesn't exist
C:\Users\isusu\Documents\third\node_modules\net.js doesn't exist
as directory
C:\Users\isusu\Documents\third\node_modules\net doesn't exist
[C:\Users\isusu\Documents\third\myApp\net]
[C:\Users\isusu\Documents\third\myApp\net.ts]
[C:\Users\isusu\Documents\third\myApp\net.tsx]
[C:\Users\isusu\Documents\third\myApp\net.mjs]
[C:\Users\isusu\Documents\third\myApp\net.js]
[C:\Users\isusu\Documents\third\myApp\node_modules\tunnel-agent\node_modules]
[C:\Users\isusu\Documents\third\myApp\node_modules\node_modules]
[C:\Users\isusu\Documents\node_modules]
[C:\Users\node_modules]
[C:\node_modules]
[C:\Users\isusu\node_modules\package.json]
[C:\Users\isusu\Documents\third\node_modules\package.json]
[C:\Users\isusu\node_modules\net\package.json]
[C:\Users\isusu\Documents\third\node_modules\net\package.json]
[C:\Users\isusu\Documents\third\myApp\node_modules\net]
[C:\Users\isusu\node_modules\net]
[C:\Users\isusu\Documents\third\node_modules\net]
[C:\Users\isusu\Documents\third\myApp\node_modules\net.ts]
[C:\Users\isusu\node_modules\net.ts]
[C:\Users\isusu\Documents\third\node_modules\net.ts]
[C:\Users\isusu\Documents\third\myApp\node_modules\net.tsx]
[C:\Users\isusu\node_modules\net.tsx]
[C:\Users\isusu\Documents\third\node_modules\net.tsx]
[C:\Users\isusu\Documents\third\myApp\node_modules\net.mjs]
[C:\Users\isusu\node_modules\net.mjs]
[C:\Users\isusu\Documents\third\node_modules\net.mjs]
[C:\Users\isusu\Documents\third\myApp\node_modules\net.js]
[C:\Users\isusu\node_modules\net.js]
[C:\Users\isusu\Documents\third\node_modules\net.js]
@ ./node_modules/tunnel-agent/index.js 3:10-24
@ ./node_modules/request/lib/tunnel.js
@ ./node_modules/request/request.js
@ ./node_modules/request/index.js
@ ./node_modules/@tensorflow/tfjs-node/node_modules/node-pre-gyp/lib/install.js
@ ./node_modules/@tensorflow/tfjs-node/node_modules/node-pre-gyp/lib sync ^./.*$
@ ./node_modules/@tensorflow/tfjs-node/node_modules/node-pre-gyp/lib/node-pre-gyp.js
@ ./node_modules/@tensorflow/tfjs-node/dist/index.js
@ ./src/app/predict/predict.page.ts
@ ./src/app/predict/predict-routing.module.ts
@ ./src/app/predict/predict.module.ts
@ ./src/app/app-routing.module.ts
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi ./src/main.ts
ERROR in ./node_modules/@tensorflow/tfjs-node/dist/int64_tensors.js
Module not found: Error: Can't resolve 'os' in 'C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\dist'
resolve 'os' in 'C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\dist'
Parsed request is a module
using description file: C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\package.json (relative path: ./dist)
Field 'browser' doesn't contain a valid alias configuration
resolve as module
looking for modules in C:/Users/isusu/Documents/third/myApp
using description file: C:\Users\isusu\Documents\third\myApp\package.json (relative path: .)
Field 'browser' doesn't contain a valid alias configuration
using description file: C:\Users\isusu\Documents\third\myApp\package.json (relative path: ./os)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\os doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\os.ts doesn't exist
.tsx
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\os.tsx doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\os.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\os.js doesn't exist
as directory
C:\Users\isusu\Documents\third\myApp\os doesn't exist
C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\dist\node_modules doesn't exist or is not a directory
C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\node_modules doesn't exist or is not a directory
C:\Users\isusu\Documents\third\myApp\node_modules\node_modules doesn't exist or is not a directory
C:\Users\isusu\Documents\node_modules doesn't exist or is not a directory
C:\Users\node_modules doesn't exist or is not a directory
C:\node_modules doesn't exist or is not a directory
looking for modules in C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\node_modules
using description file: C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\package.json (relative path: ./node_modules)
Field 'browser' doesn't contain a valid alias configuration
looking for modules in C:\Users\isusu\Documents\third\myApp\node_modules
using description file: C:\Users\isusu\Documents\third\myApp\package.json (relative path: ./node_modules)
Field 'browser' doesn't contain a valid alias configuration
looking for modules in C:\Users\isusu\node_modules
No description file found
Field 'browser' doesn't contain a valid alias configuration
looking for modules in C:\Users\isusu\Documents\third\node_modules
No description file found
Field 'browser' doesn't contain a valid alias configuration
No description file found
No description file found
using description file: C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\package.json (relative path: ./node_modules/os)
no extension
Field 'browser' doesn't contain a valid alias configuration
using description file: C:\Users\isusu\Documents\third\myApp\package.json (relative path: ./node_modules/os)
no extension
Field 'browser' doesn't contain a valid alias configuration
no extension
Field 'browser' doesn't contain a valid alias configuration
no extension
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\node_modules\os doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules\os doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\node_modules\os doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\node_modules\os doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\node_modules\os.ts doesn't exist
.tsx
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules\os.ts doesn't exist
.tsx
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\node_modules\os.ts doesn't exist
.tsx
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\node_modules\os.ts doesn't exist
.tsx
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\node_modules\os.tsx doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules\os.tsx doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\node_modules\os.tsx doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\node_modules\os.tsx doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\node_modules\os.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules\os.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\node_modules\os.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\node_modules\os.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\node_modules\os.js doesn't exist
as directory
C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\node_modules\os doesn't exist
C:\Users\isusu\Documents\third\myApp\node_modules\os.js doesn't exist
as directory
C:\Users\isusu\Documents\third\myApp\node_modules\os doesn't exist
C:\Users\isusu\node_modules\os.js doesn't exist
as directory
C:\Users\isusu\node_modules\os doesn't exist
C:\Users\isusu\Documents\third\node_modules\os.js doesn't exist
as directory
C:\Users\isusu\Documents\third\node_modules\os doesn't exist
[C:\Users\isusu\Documents\third\myApp\os]
[C:\Users\isusu\Documents\third\myApp\os.ts]
[C:\Users\isusu\Documents\third\myApp\os.tsx]
[C:\Users\isusu\Documents\third\myApp\os.mjs]
[C:\Users\isusu\Documents\third\myApp\os.js]
[C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\dist\node_modules]
[C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\node_modules]
[C:\Users\isusu\Documents\third\myApp\node_modules\node_modules]
[C:\Users\isusu\Documents\node_modules]
[C:\Users\node_modules]
[C:\node_modules]
[C:\Users\isusu\node_modules\package.json]
[C:\Users\isusu\Documents\third\node_modules\package.json]
[C:\Users\isusu\node_modules\os\package.json]
[C:\Users\isusu\Documents\third\node_modules\os\package.json]
[C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\node_modules\os]
[C:\Users\isusu\Documents\third\myApp\node_modules\os]
[C:\Users\isusu\node_modules\os]
[C:\Users\isusu\Documents\third\node_modules\os]
[C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\node_modules\os.ts]
[C:\Users\isusu\Documents\third\myApp\node_modules\os.ts]
[C:\Users\isusu\node_modules\os.ts]
[C:\Users\isusu\Documents\third\node_modules\os.ts]
[C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\node_modules\os.tsx]
[C:\Users\isusu\Documents\third\myApp\node_modules\os.tsx]
[C:\Users\isusu\node_modules\os.tsx]
[C:\Users\isusu\Documents\third\node_modules\os.tsx]
[C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\node_modules\os.mjs]
[C:\Users\isusu\Documents\third\myApp\node_modules\os.mjs]
[C:\Users\isusu\node_modules\os.mjs]
[C:\Users\isusu\Documents\third\node_modules\os.mjs]
[C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\node_modules\os.js]
[C:\Users\isusu\Documents\third\myApp\node_modules\os.js]
[C:\Users\isusu\node_modules\os.js]
[C:\Users\isusu\Documents\third\node_modules\os.js]
@ ./node_modules/@tensorflow/tfjs-node/dist/int64_tensors.js 20:11-24
@ ./node_modules/@tensorflow/tfjs-node/dist/nodejs_kernel_backend.js
@ ./node_modules/@tensorflow/tfjs-node/dist/index.js
@ ./src/app/predict/predict.page.ts
@ ./src/app/predict/predict-routing.module.ts
@ ./src/app/predict/predict.module.ts
@ ./src/app/app-routing.module.ts
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi ./src/main.ts
ERROR in ./node_modules/@tensorflow/tfjs-node/node_modules/detect-libc/lib/detect-libc.js
Module not found: Error: Can't resolve 'os' in 'C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\node_modules\detect-libc\lib'
resolve 'os' in 'C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\node_modules\detect-libc\lib'
Parsed request is a module
using description file: C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\node_modules\detect-libc\package.json (relative path: ./lib)
Field 'browser' doesn't contain a valid alias configuration
resolve as module
looking for modules in C:/Users/isusu/Documents/third/myApp
using description file: C:\Users\isusu\Documents\third\myApp\package.json (relative path: .)
Field 'browser' doesn't contain a valid alias configuration
using description file: C:\Users\isusu\Documents\third\myApp\package.json (relative path: ./os)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\os doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\os.ts doesn't exist
.tsx
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\os.tsx doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\os.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\os.js doesn't exist
as directory
C:\Users\isusu\Documents\third\myApp\os doesn't exist
C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\node_modules\detect-libc\lib\node_modules doesn't exist or is not a directory
C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\node_modules\detect-libc\node_modules doesn't exist or is not a directory
C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\node_modules\node_modules doesn't exist or is not a directory
C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\node_modules doesn't exist or is not a directory
C:\Users\isusu\Documents\third\myApp\node_modules\node_modules doesn't exist or is not a directory
C:\Users\isusu\Documents\node_modules doesn't exist or is not a directory
C:\Users\node_modules doesn't exist or is not a directory
C:\node_modules doesn't exist or is not a directory
looking for modules in C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\node_modules
using description file: C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\package.json (relative path: ./node_modules)
Field 'browser' doesn't contain a valid alias configuration
looking for modules in C:\Users\isusu\Documents\third\myApp\node_modules
using description file: C:\Users\isusu\Documents\third\myApp\package.json (relative path: ./node_modules)
Field 'browser' doesn't contain a valid alias configuration
looking for modules in C:\Users\isusu\node_modules
No description file found
Field 'browser' doesn't contain a valid alias configuration
looking for modules in C:\Users\isusu\Documents\third\node_modules
No description file found
Field 'browser' doesn't contain a valid alias configuration
No description file found
No description file found
using description file: C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\package.json (relative path: ./node_modules/os)
no extension
Field 'browser' doesn't contain a valid alias configuration
using description file: C:\Users\isusu\Documents\third\myApp\package.json (relative path: ./node_modules/os)
no extension
Field 'browser' doesn't contain a valid alias configuration
no extension
Field 'browser' doesn't contain a valid alias configuration
no extension
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\node_modules\os doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules\os doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\node_modules\os doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\node_modules\os doesn't exist
.ts
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\node_modules\os.ts doesn't exist
.tsx
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules\os.ts doesn't exist
.tsx
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\node_modules\os.ts doesn't exist
.tsx
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\node_modules\os.ts doesn't exist
.tsx
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\node_modules\os.tsx doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules\os.tsx doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\node_modules\os.tsx doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\node_modules\os.tsx doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\node_modules\os.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules\os.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\node_modules\os.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\node_modules\os.mjs doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\node_modules\os.js doesn't exist
as directory
C:\Users\isusu\Documents\third\myApp\node_modules@tensorflow\tfjs-node\node_modules\os doesn't exist
C:\Users\isusu\Documents\third\myApp\node_modules\os.js doesn't exist
as directory
C:\Users\isusu\Documents\third\myApp\node_modules\os doesn't exist
C:\Users\isusu\node_modules\os.js doesn't exist
as directory
C:\Users\isusu\node_modules\os doesn't exist
C:\Users\isusu\Documents\third\node_modules\os.js doesn't exist
as directory
C:\Users\isusu\Documents\third\node_modules\os doesn't exist