I have an electron app that runs very smoothly both in dev and prod envs.
I'm having issues with packaging a windows installer.
Here's what I'm doing.
$ npm install
-> Postinstall will take care of installing native production dependencies.
$ npm run prod-build
My output folder structure is :
--win-unpacked
--locales
-- resources
--app.asar.unpacked
--node_modules
**--node-datetime** ( no other node module is included)
--app
--electron
--elevate
...
--Some App Setup 1.0.0 .exe
Electron-builder generates an .exe file that I successfully install.
The app launches but nothing loads. Any idea where I should start?
Package.json
{
"name": "Some App",
"version": "1.0.0",
"license": "MIT",
"main": "./src/app.js",
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config proxy.conf.json",
"build":
"productName": "Some Product",
"win": {
"description": "Some Desc",
"author": "Me",
"target": "nsis",
"arch": [
"x64"
]
}
},
"test": "ng serve --proxy-config proxy.conf.json && electron . ",
"lint": "ng lint",
"e2e": "ng e2e",
"electron": "electron .",
"postinstall": " electron-builder install-app-deps",
"dev-build": "ng build -prod --aot=false && electron . ",
"prod-build": "ng build -prod --aot=false && electron-builder -w"
},
"private": true,
"dependencies": {
"#angular/animations": "^4.0.0",
"#angular/common": "^4.0.0",
"#angular/compiler": "^4.0.0",
"#angular/core": "^4.0.0",
"#angular/forms": "^4.0.0",
"#angular/http": "^4.0.0",
"#angular/platform-browser": "^4.0.0",
"#angular/platform-browser-dynamic": "^4.0.0",
"#angular/router": "^4.0.0",
"#swimlane/ngx-charts": "^6.0.2",
"#types/jspdf": "^1.1.31",
"#types/underscore": "^1.8.3",
"bluebird": "^3.5.0",
"body-parser": "^1.18.2",
"bootstrap": "^3.3.7",
"bootstrap-notify": "^3.1.3",
"chartist": "^0.11.0",
"core-js": "^2.4.1",
"d3": "^4.10.2",
"express": "^4.16.2",
"jasmine-core": "~2.6.2",
"jquery": "^3.2.1",
"moment": "^2.21.0",
"ng2-datepicker": "^1.8.3",
"ng2-modal": "0.0.25",
"ngx-modialog": "^3.0.4",
"node-datetime": "^2.0.3",
"rxjs": "^5.1.0",
"sqlite3": "^4.0.0",
"underscore": "^1.8.3",
"zone.js": "^0.8.4"
},
"devDependencies": {
"#angular/cli": "1.2.1",
"#angular/compiler-cli": "^4.0.0",
"#angular/language-service": "^4.0.0",
"#types/electron": "^1.6.10",
"#types/jasmine": "~2.5.53",
"#types/jasminewd2": "~2.0.2",
"#types/jquery": "^3.2.12",
"#types/node": "~6.0.60",
"codelyzer": "~3.0.1",
"electron": "^1.8.4",
"electron-builder": "^19.45.4",
"electron-packager": "^9.1.0",
"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.0.4",
"tslint": "~5.3.2",
"typescript": "~2.3.3"
},
added this to the bottom of my package.json instead of where it was before
"build": {
"win": {
"target": "nsis"
}
}
}
app.js (entry point)
const electron = require('electron');
const express = require('express');
const e_app = express();
const bodyParser = require('body-parser');
const path = require('path')
const app = electron.app
const BrowserWindow = electron.BrowserWindow;
const url = require('url');
const fs = require('fs');
const os= require('os');
const ipc = electron.ipcMain;
const shell = electron.shell;
const router = require('./electron/routes/req-router');
const dateTime = require('node-datetime');
let win
let temp_win
//set to true for production release
function createWindow () {
win = new BrowserWindow({width:1200,height:750,webPreferences: {webSecurity: false}})
var serve_path = path.join('file://',__dirname,'/../build/index.html');
win.loadURL(serve_path);
win.on('closed', function () {
win = null
})
}
Project Folder Structure
--build
--db
--dist
--e2e
--node_modules
--src
--app
--assets
--electron
--environemtns
-app.js
-index.html
...
--typings
Installing electron-packager and referencing the packaged output when calling electron-build seems to do the trick.
$ npm install --save-dev electron-packager#9.1.0 ( which happens to be the release version that doesn't error out on me"
added the following script
"pack": "electron-packager ."
modified the prod-build script
"prod-build": "ng build -prod --aot=false && electron-builder -w --prepackaged ./Some-App-win32-x64",
Related
I am running a docker-based next.js project. All development is done inside of the a dev container (docker). It uses the WSL2 and dockerDesktop. My system is windows 11. The problem is the hot reload of next.js doesn't work. When I made changes on saving, the next.js app didn't detect changes. This results in constantly refreshing the server with (npm run dev) so I can view my changes.
I put the project on the desktop on my Windows 11. In the WSL2, I can find the project folder is in
/mnt/c/Users/liang/OneDrive/Desktop/open_source/frontend
Below is my envioment
Package.json
{
"name": "frontend",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev -p 4000",
"build": "next build",
"start": "next start",
"lint": "next lint",
"test": "jest",
"test.watch": "jest --watch",
"db.clear": "mongosh \"mongodb://localhost:27017/ramses?readPreference=primary&ssl=false\" --eval 'db.dropDatabase(\"ramses\")'",
"db.init": "mongosh \"mongodb://localhost:27017/ramses?readPreference=primary&ssl=false\" .submodules/ecommerce/db/nosql/*"
},
"dependencies": {
"#babel/cli": "7.16.0",
"#babel/core": "7.16.5",
"#elastic/elasticsearch": "^8.2.1",
"#elastic/react-search-ui": "^1.13.0",
"#elastic/react-search-ui-views": "^1.13.0",
"#elastic/search-ui": "^1.12.1",
"#elastic/search-ui-app-search-connector": "^1.13.0",
"#elastic/search-ui-elasticsearch-connector": "^1.14.0",
"#headlessui/react": "^1.6.4",
"#heroicons/react": "^1.0.6",
"#hookform/resolvers": "^2.8.8",
"#material-ui/core": "^4.12.3",
"#sendgrid/mail": "^7.7.0",
"#tailwindcss/forms": "^0.5.2",
"autoprefixer": "latest",
"babel-loader": "^8.2.3",
"bcryptjs": "^2.4.3",
"bl": "^5.0.0",
"browserify-fs": "^1.0.0",
"enhanced-resolve": "^5.8.3",
"eslint": "^8.6.0",
"eslint-config-next": "^12.0.7",
"follow-redirects": "^1.14.8",
"form-data": "^4.0.0",
"mailgun": "^0.5.0",
"moment": "^2.29.3",
"mongodb": "^4.7.0",
"mongoose": "^6.3.8",
"multer": "^1.4.5-lts.1",
"nanoid": "^3.2.0",
"next": "^12.1.6",
"next-auth": "^4.5.0",
"next-auth-client": "^1.5.0",
"next-connect": "^0.12.2",
"next-i18next": "^11.0.0",
"node-fetch": "^3.2.6",
"nodemailer": "^6.7.2",
"nodemon": "^2.0.16",
"object-keys": "^1.1.1",
"path-browserify": "^1.0.1",
"postcss": "^8.4.12",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-hook-form": "^7.25.0",
"react-responsive-carousel": "^3.2.22",
"react-table": "^7.7.0",
"react-test-renderer": "17.0.2",
"react-toastify": "^8.2.0",
"semver": "^7.3.5",
"sharp": "^0.30.5",
"stripe": "^9.5.0",
"tailwind-styled-components": "^2.1.7",
"tailwindcss": "^3.1.3",
"typescript": "^4.7.3",
"uuid": "^8.3.2",
"webpack": "^5.73.0",
"yup": "^0.32.11"
},
"devDependencies": {
"#testing-library/jest-dom": "5.14.1",
"#testing-library/react": "12.1.2",
"babel-jest": "27.3.1",
"identity-obj-proxy": "3.0.0",
"jest": "27.3.1"
}
}
As the title explains, i have a simple Electron app that loads a html page when started. Everything works fine, but if i try to build the project using electron-builder (yarn dist), the application shows nothing but a blank screen. Any idea of why this happens?
My project structure is the following:
-- e2e
-- dist
-- node_modules
-- src
-- app
-- assets
-- environments
-- index.html
-- editor.config
-- angular.json
-- broswerlist
-- karma.conf.js
-- main.js
-- package.json
-- package-lock.json
-- tsconfig.json
-- tslint.json
I also post my main.js and package.json files:
main.js
const electron = require("electron")
const {app, Menu, BrowserWindow} = require("electron")
const path = require("path")
let mainWindow
app.on('window-all-closed', e => e.preventDefault() )
app.on('ready', createWindow);
function createWindow() {
mainWindow = new BrowserWindow({
width:1380,
frame:false,
closable: false,
minimizable: false,
maximizable: false,
resizable: false,
autoHideMenuBar: true,
webPreferences: {
nodeIntegration: true
}
})
mainWindow.webContents.openDevTools();
mainWindow.loadURL(url.format({
pathname: path.join(__dirname, 'dist/index.html'),
protocol: "file",
slashes: "true"
}))
}
package.json
{
"name": "test_app",
"version": "1.0.0",
"description": "test",
"author": "me",
"main": "main.js",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"electron": "electron .",
"dist": "electron-builder",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"devDependencies": {
"electron": "7.1.8",
"electron-builder": "^22.2.0"
},
"build": {
"target": [
"nsis"
]
},
"dependencies": {
"msal-electron-poc": "^0.1.0",
"#angular-devkit/build-angular": "~0.803.21",
"#angular/animations": "~8.2.14",
"#angular/cli": "~8.3.21",
"#angular/common": "~8.2.14",
"#angular/compiler": "~8.2.14",
"#angular/compiler-cli": "~8.2.14",
"#angular/core": "~8.2.14",
"#angular/forms": "~8.2.14",
"#angular/language-service": "~8.2.14",
"#angular/platform-browser": "~8.2.14",
"#angular/platform-browser-dynamic": "~8.2.14",
"#angular/router": "~8.2.14",
"#types/jasmine": "~3.3.8",
"#types/jasminewd2": "~2.0.3",
"#types/node": "~8.9.4",
"codelyzer": "^5.0.0",
"fs": "0.0.1-security",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"protractor": "~5.4.0",
"rxjs": "~6.4.0",
"ts-node": "~7.0.0",
"tslib": "^1.10.0",
"tslint": "~5.15.0",
"typescript": "~3.5.3",
"zone.js": "~0.9.1"
}
}
//Replace
path.join(__dirname, 'dist/index.html')
//with
path.join(__dirname, 'src/index.html')
Had same problem. And was able to run electron on windows by running.
for windows:
vue-cli-service electron:build --mode development --windows
for Linux:
vue-cli-service electron:build --mode development --rpm
And check if there are some hidden errors or it just work after.
I keep getting this error:
error in ./node_modules/keytar/build/Release/keytar.node
Module parse failed: Unexpected character '�' (1:2)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)
# ./node_modules/keytar/lib/keytar.js 1:13-52
# ./src/background.js
# multi ./src/background.js
I have background.js set as the main electron file in package.json because I'm using vue/vuetify with it which uses a main.js file as well.
{
"name": "project",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"electron:build": "vue-cli-service electron:build",
"electron:serve": "vue-cli-service electron:serve",
"postinstall": "electron-builder install-app-deps",
"postuninstall": "electron-builder install-app-deps"
},
"main": "background.js", // <------------------ see right here
"dependencies": {
"axios": "^0.19.0",
"core-js": "^3.4.3",
"jwt-decode": "^2.2.0",
"keytar": "^5.0.0",
"request": "^2.88.0",
"vue": "^2.6.10",
"vue-router": "^3.1.3",
"vuetify": "^2.1.0",
"vuex": "^3.1.2"
},
"devDependencies": {
"#vue/cli-plugin-babel": "^4.1.0",
"#vue/cli-plugin-eslint": "^4.1.0",
"#vue/cli-service": "^4.1.0",
"babel-eslint": "^10.0.3",
"electron": "^7.1.3",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",
"node-loader": "^0.6.0",
"sass": "^1.19.0",
"sass-loader": "^8.0.0",
"vue-cli-plugin-electron-builder": "^1.4.3",
"vue-cli-plugin-vuetify": "^2.0.2",
"vue-template-compiler": "^2.6.10",
"vuetify-loader": "^1.3.0"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"rules": {},
"parserOptions": {
"parser": "babel-eslint"
}
},
"browserslist": [
"> 1%",
"last 2 versions"
]
}
Searching, it seems this happens when keytar is used in a renderer process. But background.js isn't a renderer process. Or am I missing something? I am completely new to electron.
I needed to mark keytar as external (as mentioned at https://nklayman.github.io/vue-cli-plugin-electron-builder/guide/guide.html#native-modules)
// vue.config.js
module.exports = {
pluginOptions: {
electronBuilder: {
// List native deps here if they don't work
externals: ['keytar']
}
}
}
Once I did that it worked properly.
Run appropriate loader (source).
yarn add node-loader -D
// vue.config.js
configureWebpack: {
devtool: 'source-map',
module: {
rules: [
{ test: /\.node$/, loader: 'node-loader' }
]
}
}
I developped a web app with angular i need to package my web app using electron , it all seems fine until i run electron-packager , it takes forever , i dont know if it is supposed to be this slow or is there something wrong ?
ps : im on windows 7
this is my package.json
{
"name": "recherche-final",
"version": "0.0.0",
"main": "main.js",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"electron": "electron .",
"electron-build": "ng build && electron .",
"pack": "electron-packager."
},
"private": true,
"dependencies": {
"#angular/animations": "^6.0.3",
"#angular/cdk": "^6.2.0",
"#angular/common": "^6.0.3",
"#angular/compiler": "^6.0.3",
"#angular/core": "^6.0.3",
"#angular/forms": "^6.0.3",
"#angular/http": "^6.0.3",
"#angular/material": "^6.4.2",
"#angular/platform-browser": "^6.0.3",
"#angular/platform-browser-dynamic": "^6.0.3",
"#angular/router": "^6.0.3",
"core-js": "^2.5.4",
"rxjs": "^6.0.0",
"zone.js": "^0.8.26"
},
"devDependencies": {
"#angular-devkit/build-angular": "~0.6.8",
"#angular/cli": "~6.0.8",
"#angular/compiler-cli": "^6.0.3",
"#angular/language-service": "^6.0.3",
"#types/jasmine": "~2.8.6",
"#types/jasminewd2": "~2.0.3",
"#types/node": "~8.9.4",
"codelyzer": "~4.2.1",
"electron": "^5.0.6",
"electron-packager": "^14.0.1",
"electron-winstaller": "^3.0.4",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.0",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.3.0",
"ts-node": "~5.0.1",
"tslint": "~5.9.1",
"typescript": "~2.7.2"
}
}
i expect my app.exe
I know this is a late answer but just in case it helps anybody else- Have you checked how you have packaged your app? Make sure that your package.json files for angular and Electron are different. You are probably packing all the angular node modules as well into the electron application which is not necessary.
https://medium.com/#hellobharadwaj/electron-plus-angular-react-why-use-2-different-package-json-files-361ae47d07f3
I am trying to install Angular CLI using Visual Studio 2017 but it throws an exception while running the command.
> .npm [On.Store.UI] install -g #angular/cli
C:\Users\child\AppData\Roaming\npm\ng -> C:\Users\child\AppData\Roaming\npm\node_modules\#angular\cli\bin\ng
> node-sass#4.5.3 install C:\Users\child\AppData\Roaming\npm\node_modules\#angular\cli\node_modules\node-sass
> node scripts/install.js
Cached binary found at C:\Users\child\AppData\Roaming\npm-cache\node-sass\4.5.3\win32-x64-48_binding.node
> node-sass#4.5.3 postinstall C:\Users\child\AppData\Roaming\npm\node_modules\#angular\cli\node_modules\node-sass
> node scripts/build.js
Binary found at C:\Users\child\AppData\Roaming\npm\node_modules\#angular\cli\node_modules\node-sass\vendor\win32-x64-48\binding.node
Testing binary
Binary is fine
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-pre-gyp#0.6.33 (node_modules\#angular\cli\node_modules\fsevents\node_modules\node-pre-gyp):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\child\AppData\Roaming\npm\node_modules\#angular\cli\node_modules\fsevents\node_modules\node-pre-gyp' -> 'C:\Users\child\AppData\Roaming\npm\node_modules\#angular\cli\node_modules\fsevents\node_modules\.node-pre-gyp.DELETE'
+ #angular/cli#1.1.1
added 823 packages and updated 1 package in 167.125s
[On.Store.UI] install -g #angular/cli successfully completed
> .npm [On.Store.UI] install -g #angular/cli
C:\Users\child\AppData\Roaming\npm\ng -> C:\Users\child\AppData\Roaming\npm\node_modules\#angular\cli\bin\ng
> fsevents#1.1.1 install C:\Users\child\AppData\Roaming\npm\node_modules\#angular\cli\node_modules\fsevents
> node install
+ #angular/cli#1.1.1
added 120 packages, removed 1 package and updated 1 package in 83.667s
[On.Store.UI] install -g #angular/cli successfully completed
>
My package json is :
{
"name": "#angular/cli",
"version": "1.1.1",
"description": "CLI tool for Angular",
"main": "packages/#angular/cli/lib/cli/index.js",
"trackingCode": "UA-8594346-19",
"bin": {
"ng": "./bin/ng"
},
"keywords": [],
"scripts": {
"build": "node scripts/run-tool.js publish build",
"test": "npm-run-all -c test:packages test:cli test:deps test:licenses test:messages",
"e2e": "npm run test:e2e",
"e2e:nightly": "node tests/run_e2e.js --nightly",
"test:e2e": "node tests/run_e2e.js",
"test:cli": "node tests/runner",
"test:deps": "node scripts/publish/validate_dependencies.js",
"test:inspect": "node --inspect --debug-brk tests/runner",
"test:licenses": "node scripts/test-licenses.js",
"test:messages": "node scripts/test-commit-messages.js",
"test:packages": "node scripts/run-packages-spec.js",
"eslint": "eslint .",
"tslint": "tslint \"**/*.ts\" -c tslint.json -e \"**/config/schema.d.ts\" -e \"**/tests/**\" -e \"**/blueprints/*/files/**/*.ts\" -e \"node_modules/**\" -e \"tmp/**\" -e \"dist/**\"",
"lint": "npm-run-all -c eslint tslint",
"tool": "node scripts/run-tool.js"
},
"repository": {
"type": "git",
"url": "https://github.com/angular/angular-cli.git"
},
"engines": {
"node": ">= 6.9.0",
"npm": ">= 3.0.0"
},
"author": "Angular Authors",
"license": "MIT",
"bugs": {
"url": "https://github.com/angular/angular-cli/issues"
},
"homepage": "https://github.com/angular/angular-cli",
"dependencies": {
"autoprefixer": "^6.5.3",
"chalk": "^1.1.3",
"common-tags": "^1.3.1",
"css-loader": "^0.28.1",
"cssnano": "^3.10.0",
"debug": "^2.1.3",
"denodeify": "^1.2.1",
"diff": "^3.1.0",
"ember-cli-normalize-entity-name": "^1.0.0",
"ember-cli-string-utils": "^1.0.0",
"enhanced-resolve": "^3.1.0",
"exports-loader": "^0.6.3",
"extract-text-webpack-plugin": "^2.1.0",
"file-loader": "^0.10.0",
"fs-extra": "~3.0.1",
"get-caller-file": "^1.0.0",
"glob": "^7.0.3",
"html-webpack-plugin": "^2.19.0",
"inflection": "^1.7.0",
"inquirer": "^3.0.0",
"isbinaryfile": "^3.0.0",
"istanbul-instrumenter-loader": "^2.0.0",
"json-loader": "^0.5.4",
"less": "^2.7.2",
"less-loader": "^4.0.2",
"loader-utils": "^1.0.2",
"license-webpack-plugin": "^0.4.3",
"lodash": "^4.11.1",
"magic-string": "^0.19.0",
"memory-fs": "^0.4.1",
"minimatch": "^3.0.3",
"node-modules-path": "^1.0.0",
"nopt": "^4.0.1",
"opn": "4.0.2",
"portfinder": "~1.0.12",
"postcss-loader": "^1.3.3",
"postcss-url": "^5.1.2",
"raw-loader": "^0.5.1",
"resolve": "^1.1.7",
"rimraf": "^2.5.3",
"rsvp": "^3.0.17",
"rxjs": "^5.0.1",
"sass-loader": "^6.0.3",
"script-loader": "^0.7.0",
"semver": "^5.3.0",
"silent-error": "^1.0.0",
"source-map": "^0.5.6",
"source-map-loader": "^0.2.0",
"style-loader": "^0.13.1",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.1",
"temp": "0.8.3",
"typescript": "~2.3.1",
"url-loader": "^0.5.7",
"walk-sync": "^0.3.1",
"webpack": "~2.4.0",
"webpack-dev-middleware": "^1.10.2",
"webpack-dev-server": "~2.4.5",
"webpack-merge": "^2.4.0",
"zone.js": "^0.8.4"
},
"devDependencies": {
"#angular/compiler": "^4.0.0",
"#angular/compiler-cli": "^4.0.0",
"#angular/core": "^4.0.0",
"#types/chai": "^3.4.32",
"#types/chalk": "^0.4.28",
"#types/common-tags": "^1.2.4",
"#types/denodeify": "^1.2.29",
"#types/express": "^4.0.32",
"#types/fs-extra": "~3.0.2",
"#types/glob": "^5.0.29",
"#types/jasmine": "~2.2.0",
"#types/lodash": "4.14.50",
"#types/minimist": "^1.2.0",
"#types/mock-fs": "^3.6.30",
"#types/node": "^6.0.36",
"#types/request": "0.0.39",
"#types/rimraf": "0.0.28",
"#types/semver": "^5.3.30",
"#types/source-map": "^0.5.0",
"#types/webpack": "^2.2.15",
"chai": "^3.5.0",
"conventional-changelog": "^1.1.0",
"dtsgenerator": "^0.9.1",
"eslint": "^3.11.0",
"express": "^4.14.0",
"jasmine": "^2.4.1",
"jasmine-spec-reporter": "^3.2.0",
"minimist": "^1.2.0",
"mocha": "^3.2.0",
"mock-fs": "^4.0.0",
"npm-run": "^4.1.0",
"npm-run-all": "^4.0.0",
"object-assign": "^4.0.1",
"request": "^2.74.0",
"resolve-bin": "^0.4.0",
"rewire": "^2.5.1",
"spdx-satisfies": "^0.1.3",
"through": "^2.3.6",
"tree-kill": "^1.0.0",
"ts-node": "^2.0.0",
"tslint": "^5.1.0"
},
"optionalDependencies": {
"node-sass": "^4.3.0"
}
}
=======tsConfig.js
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false
},
"compileOnSave": true,
"exclude": [
"node_modules"
]
}
my visual code compiler errors are mentioned below :
Severity Code Description Project File Line Suppression State
Error TS2304 Cannot find name 'Promise'. On.Store.UI (tsconfig project) L:\ESaleStore\On.Store.UI\src\On.Store.UI\node_modules\#angular\common\src\location\platform_location.d.ts 51 Active
Error TS2304 Cannot find name 'Promise'. On.Store.UI (tsconfig project) L:\ESaleStore\On.Store.UI\src\On.Store.UI\node_modules\#angular\common\src\location\platform_location.d.ts 51 Active
Error TS2304 Cannot find name 'Promise'. On.Store.UI (tsconfig project) L:\ESaleStore\On.Store.UI\src\On.Store.UI\node_modules\#angular\common\src\pipes\async_pipe.d.ts 45 Active
Error TS2304 Cannot find name 'Promise'. On.Store.UI (tsconfig project) L:\ESaleStore\On.Store.UI\src\On.Store.UI\node_modules\#angular\compiler\src\aot\compiler_host.d.ts 25 Active
Error TS2339 Property 'find' does not exist on type 'BillingPackage[]'. On.Store.UI (tsconfig project) L:\ESaleStore\On.Store.UI\src\On.Store.UI\wwwroot\app\Billing\Billing.Service.ts 27 Active