- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我们正在努力为 Windows 32 位和 64 位构建应用。
它是使用 sqlite3 作为数据库的 angular 2 应用程序。
在开发中一切正常,但在打包应用程序并在 Windows 上运行它后会抛出错误
SQLite package has not been found installed. Try to install it: npm install sqlite3 --save
这是 package.json(其中对这个问题很重要的一部分):
"scripts": {
"build:aot:prod": "npm run clean:dist && npm run clean:aot && cross-env BUILD_AOT=1 npm run webpack -- --config config/webpack.prod.js --progress --profile --bail",
"build:aot": "npm run build:aot:prod",
"build:dev": "npm run clean:dist && npm run webpack -- --config config/webpack.dev.js --progress --profile",
"build:docker": "npm run build:prod && docker build -t angular2-webpack-start:latest .",
"build:prod": "npm run clean:dist && npm run webpack -- --config config/webpack.prod.js --progress --profile --bail",
"build": "npm run build:dev",
"ci:aot": "npm run lint && npm run test && npm run build:aot && npm run e2e",
"ci:jit": "npm run lint && npm run test && npm run build:prod && npm run e2e",
"ci:nobuild": "npm run lint && npm test && npm run e2e",
"ci:testall": "npm run lint && npm run test && npm run build:prod && npm run e2e && npm run build:aot && npm run e2e",
"ci:travis": "npm run lint && npm run test && npm run build:aot && npm run e2e:travis",
"ci": "npm run ci:testall",
"clean:dll": "npm run rimraf -- dll",
"clean:aot": "npm run rimraf -- compiled",
"clean:dist": "npm run rimraf -- dist",
"clean:install": "npm set progress=false && npm install",
"clean": "npm cache clean --force && npm run rimraf -- node_modules doc coverage dist compiled dll",
"docker": "docker",
"docs": "npm run typedoc -- --options typedoc.json --exclude '**/*.spec.ts' ./src/",
"e2e:live": "npm-run-all -p -r server:prod:ci protractor:live",
"e2e:travis": "npm-run-all -p -r server:prod:ci protractor:delay",
"e2e": "npm-run-all -p -r server:prod:ci protractor",
"github-deploy:dev": "npm run webpack -- --config config/webpack.github-deploy.js --progress --profile --env.githubDev",
"github-deploy:prod": "npm run webpack -- --config config/webpack.github-deploy.js --progress --profile --env.githubProd",
"github-deploy": "npm run github-deploy:dev",
"lint": "npm run tslint \"src/**/*.ts\"",
"node": "node",
"postinstall": "install-app-deps && electron-rebuild",
"postversion": "git push && git push --tags",
"preclean:install": "npm run clean",
"preversion": "npm test",
"protractor": "protractor",
"protractor:delay": "sleep 3 && npm run protractor",
"protractor:live": "protractor --elementExplorer",
"rimraf": "rimraf",
"server:dev:hmr": "npm run server:dev -- --inline --hot",
"server:dev": "npm run webpack-dev-server -- --config config/webpack.dev.js --progress --profile --watch --content-base src/",
"server:prod": "http-server dist -c-1 --cors",
"server:prod:ci": "http-server dist -p 3000 -c-1 --cors",
"server": "npm run server:dev",
"start:hmr": "npm run server:dev:hmr",
"start": "npm run server:dev",
"test": "npm run lint && karma start",
"tslint": "tslint",
"typedoc": "typedoc",
"version": "npm run build",
"watch:dev:hmr": "npm run watch:dev -- --hot",
"watch:dev": "npm run build:dev -- --watch",
"watch:prod": "npm run build:prod -- --watch",
"watch:test": "npm run test -- --auto-watch --no-single-run",
"watch": "npm run watch:dev",
"electron:pre": "copyfiles main.js dist && copyfiles package.json dist && copyfiles ./icons/* ./dist && npm --prefix ./dist install ./dist --production",
"electron:dev": "cross-env NODE_ENV=development electron .",
"electron:prod": "npm run build:aot:prod && npm run electron:pre && electron ./dist",
"electron:linux": "npm run build:aot:prod && npm run electron:pre && node package.js --asar --platform=linux --arch=x64 && cd dist && electron-builder install-app-deps --platform=linux --arch=x64",
"electron:windows": "npm run build:aot:prod && npm run electron:pre && electron-builder install-app-deps --platform=win32 && node package.js --asar --platform=win32",
"electron:mac": "npm run build:aot:prod && npm run electron:pre && node package.js --asar --platform=darwin --arch=x64 && cd dist && electron-builder install-app-deps --platform=darwin --arch=x64",
"webdriver-manager": "webdriver-manager",
"webdriver:start": "npm run webdriver-manager start",
"webdriver:update": "webdriver-manager update",
"webpack-dev-server": "node --max_old_space_size=4096 node_modules/webpack-dev-server/bin/webpack-dev-server.js",
"webpack": "node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js"
},
"dependencies": {
"node-pre-gyp": "^0.6.38",
"sqlite3": "^3.1.9",
"typeorm": "0.1.0-alpha.49",
"uikit": "^3.0.0-beta.30"
},
"devDependencies": {
"@angular/animations": "~4.3.1",
"@angular/common": "~4.3.1",
"@angular/compiler": "~4.3.1",
"@angular/compiler-cli": "~4.3.1",
"@angular/core": "~4.3.1",
"@angular/forms": "~4.3.1",
"@angular/http": "~4.3.1",
"@angular/platform-browser": "~4.3.1",
"@angular/platform-browser-dynamic": "~4.3.1",
"@angular/platform-server": "~4.3.1",
"@angular/router": "~4.3.1",
"@angularclass/hmr": "~1.2.2",
"@angularclass/hmr-loader": "^3.0.4",
"@ngrx/effects": "^4.0.5",
"@ngrx/store": "^4.0.3",
"@types/hammerjs": "^2.0.34",
"@types/jasmine": "2.5.45",
"@types/node": "^7.0.39",
"@types/source-map": "^0.5.0",
"@types/uglify-js": "^2.6.28",
"@types/webpack": "^2.2.16",
"add-asset-html-webpack-plugin": "^1.0.2",
"angular2-template-loader": "^0.6.2",
"assets-webpack-plugin": "^3.5.1",
"awesome-typescript-loader": "~3.1.2",
"codelyzer": "~2.1.1",
"copy-webpack-plugin": "^4.0.1",
"copyfiles": "^1.2.0",
"core-js": "^2.4.1",
"cross-env": "^5.0.0",
"css-loader": "^0.28.0",
"electron": "1.7.5",
"electron-builder": "^19.27.7",
"electron-packager": "8.7.2",
"electron-rebuild": "^1.6.0",
"electron-reload": "^1.1.0",
"exports-loader": "^0.6.4",
"expose-loader": "^0.7.3",
"extract-text-webpack-plugin": "~2.1.0",
"file-loader": "^0.11.1",
"find-root": "^1.0.0",
"gh-pages": "^1.0.0",
"html-webpack-plugin": "^2.28.0",
"http-server": "^0.9.0",
"ie-shim": "^0.1.0",
"imports-loader": "^0.7.1",
"inline-manifest-webpack-plugin": "^3.0.1",
"istanbul-instrumenter-loader": "2.0.0",
"jasmine-core": "^2.5.2",
"jquery": "^3.2.1",
"karma": "^1.6.0",
"karma-chrome-launcher": "^2.0.0",
"karma-coverage": "^1.1.1",
"karma-jasmine": "^1.1.0",
"karma-mocha-reporter": "^2.2.3",
"karma-remap-coverage": "^0.1.4",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^2.0.4",
"less": "^2.7.2",
"less-loader": "^4.0.5",
"ng-router-loader": "^2.1.0",
"ngc-webpack": "^3.2.0",
"node-sass": "^4.5.2",
"npm-run-all": "^4.0.2",
"optimize-js-plugin": "0.0.4",
"parse5": "^3.0.2",
"preload-webpack-plugin": "^1.2.2",
"protractor": "^5.1.1",
"raw-loader": "0.5.1",
"reflect-metadata": "^0.1.10",
"rimraf": "~2.6.1",
"rxjs": "~5.0.2",
"sass-loader": "^6.0.3",
"script-ext-html-webpack-plugin": "^1.8.5",
"source-map-loader": "^0.2.1",
"string-replace-loader": "~1.2.0",
"style-loader": "^0.18.1",
"to-string-loader": "^1.1.5",
"ts-node": "^3.3.0",
"tslib": "^1.7.1",
"tslint": "~4.5.1",
"tslint-loader": "^3.5.2",
"typedoc": "^0.7.1",
"typescript": "2.5.0",
"uglify-js": "git://github.com/mishoo/UglifyJS2#harmony-v2.8.22",
"uglifyjs-webpack-plugin": "0.4.3",
"url-loader": "^0.5.8",
"webpack": "~2.6.1",
"webpack-dev-middleware": "^1.10.1",
"webpack-dev-server": "~2.4.2",
"webpack-dll-bundles-plugin": "^1.0.0-beta.5",
"webpack-merge": "~4.1.0",
"zone.js": "0.8.14"
},
运行 npm run electron:windows
后一切正常,输出如下:
/home/haris/.nvm/versions/node/v6.9.4/bin/node/home/haris/.nvm/versions/node/v6.9.4/lib/node_modules/npm/bin/npm-cli。 js 运行 electron:windows --scripts-prepend-node-path=auto
> angular-electron-starter@1.0.0 electron:windows /home/haris/development/walter/bitbucket-
> npm run build:aot:prod && npm run electron:pre && electron-builder install-app-deps --platform=win32 && node package.js --asar --platform=win32
> angular-electron-starter@1.0.0 build:aot:prod /home/haris/development/walter/bitbucket-
> npm run clean:dist && npm run clean:aot && cross-env BUILD_AOT=1 npm run webpack -- --config config/webpack.prod.js --progress --profile --bail
> angular-electron-starter@1.0.0 clean:dist /home/haris/development/walter/bitbucket-
> npm run rimraf -- dist
> angular-electron-starter@1.0.0 rimraf /home/haris/development/walter/bitbucket-
> rimraf "dist"
> angular-electron-starter@1.0.0 clean:aot /home/haris/development/walter/bitbucket-
> npm run rimraf -- compiled
> angular-electron-starter@1.0.0 rimraf /home/haris/development/walter/bitbucket-
> rimraf "compiled"
> angular-electron-starter@1.0.0 webpack /home/haris/development/walter/bitbucket-
> node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js "--config" "config/webpack.prod.js" "--progress" "--profile" "--bail"
Starting compilation using the angular compiler.
Angular compilation done, starting webpack bundling.
0% compiling
10% building modules 0/1 modules 1 active ...ntent-manager/src/main.browser.aot.ts
10% building modules 0/2 modules 2 active ...tent-manager/src/polyfills.browser.ts
[at-loader] Using typescript@2.5.0 from typescript and "tsconfig.json" from /home/haris/development/walter/bitbucket-/tsconfig.webpack.json.
10% building modules 1/2 modules 1 active ...tent-manager/src/polyfills.browser.ts
# I removed building modules proccess because of limit of characters on stackoverflow.
25067ms additional asset processing
92% chunk asset optimization
3538ms chunk asset optimization
94% asset optimization
[at-loader] Checking started in a separate process...
[at-loader] Ok, 2.38 sec.
2788ms asset optimization
95% emitting
18ms emitting
Hash: a3f29d769fb284afcae1
Version: webpack 2.6.1
Time: 62001ms
[emitted]
WARNING in ./~/typeorm/platform/PlatformTools.js
33:19-32 Critical dependency: the request of a dependency is an expression
WARNING in ./~/typeorm/platform/PlatformTools.js
37:23-85 Critical dependency: the request of a dependency is an expression
Child html-webpack-plugin for "index.html":
[3IRH] (webpack)/buildin/module.js 517 bytes {0} [built]
[] -> factory:36ms building:174ms = 210ms
[7GO9] ./~/html-webpack-plugin/lib/loader.js!./src/index.html 2.2 kB {0} [built]
factory:6ms building:11ms = 17ms
[DuR2] (webpack)/buildin/global.js 509 bytes {0} [built]
[] -> factory:36ms building:174ms = 210ms
[M4fF] ./~/lodash/lodash.js 540 kB {0} [built]
[] -> factory:83ms building:3556ms = 3639ms
Child extract-text-webpack-plugin:
[9rjH] ./~/css-loader!./src/styles/headings.css 166 bytes {0} [built]
factory:2ms building:17ms = 19ms
[FZ+f] ./~/css-loader/lib/css-base.js 2.26 kB {0} [built]
[] -> factory:0ms building:2ms = 2ms
Child extract-text-webpack-plugin:
[FZ+f] ./~/css-loader/lib/css-base.js 2.26 kB {0} [built]
[] -> factory:0ms building:1ms = 1ms
[pZge] ./~/css-loader!./~/less-loader/dist/cjs.js!./src/styles/styles.less 256 kB {0} [built]
factory:3ms building:5063ms = 5066ms
> angular-electron-starter@1.0.0 electron:pre /home/haris/development/walter/bitbucket-
> copyfiles main.js dist && copyfiles package.json dist && copyfiles ./icons/* ./dist && npm --prefix ./dist install ./dist --production
> sqlite3@3.1.13 install /home/haris/development/walter/bitbucket-/dist/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build
[sqlite3] Success: "/home/haris/development/walter/bitbucket-/dist/node_modules/sqlite3/lib/binding/node-v48-linux-x64/node_sqlite3.node" is installed via remote
> angular-electron-starter@1.0.0 postinstall /home/haris/development/walter/bitbucket-/dist
> install-app-deps && electron-rebuild
Warning: Please use as subcommand: electron-builder install-app-deps
electron-builder 19.36.0
Rebuilding native production dependencies for linux:x64
✔ Rebuild Complete
angular-electron-starter@1.0.0 /home/haris/development/walter/bitbucket-/dist
├─┬ node-pre-gyp@0.6.38
│ ├─┬ hawk@3.1.3
│ │ ├── boom@2.10.1
│ │ ├── cryptiles@2.0.5
│ │ ├── hoek@2.16.3
│ │ └── sntp@1.0.9
│ ├─┬ mkdirp@0.5.1
│ │ └── minimist@0.0.8
│ ├─┬ nopt@4.0.1
│ │ ├── abbrev@1.1.1
│ │ └─┬ osenv@0.1.4
│ │ ├── os-homedir@1.0.2
│ │ └── os-tmpdir@1.0.2
│ ├─┬ npmlog@4.1.2
│ │ ├─┬ are-we-there-yet@1.1.4
│ │ │ └── delegates@1.0.0
│ │ ├── console-control-strings@1.1.0
│ │ ├─┬ gauge@2.7.4
│ │ │ ├── aproba@1.2.0
│ │ │ ├── has-unicode@2.0.1
│ │ │ ├── object-assign@4.1.1
│ │ │ ├── signal-exit@3.0.2
│ │ │ ├─┬ string-width@1.0.2
│ │ │ │ ├── code-point-at@1.1.0
│ │ │ │ └─┬ is-fullwidth-code-point@1.0.0
│ │ │ │ └── number-is-nan@1.0.1
│ │ │ ├─┬ strip-ansi@3.0.1
│ │ │ │ └── ansi-regex@2.1.1
│ │ │ └── wide-align@1.1.2
│ │ └── set-blocking@2.0.0
│ ├─┬ rc@1.2.1
│ │ ├── deep-extend@0.4.2
│ │ ├── ini@1.3.4
│ │ ├── minimist@1.2.0
│ │ └── strip-json-comments@2.0.1
│ ├─┬ request@2.81.0
│ │ ├── aws-sign2@0.6.0
│ │ ├── aws4@1.6.0
│ │ ├── caseless@0.12.0
│ │ ├─┬ combined-stream@1.0.5
│ │ │ └── delayed-stream@1.0.0
│ │ ├── extend@3.0.1
│ │ ├── forever-agent@0.6.1
│ │ ├─┬ form-data@2.1.4
│ │ │ └── asynckit@0.4.0
│ │ ├─┬ har-validator@4.2.1
│ │ │ ├─┬ ajv@4.11.8
│ │ │ │ ├── co@4.6.0
│ │ │ │ └─┬ json-stable-stringify@1.0.1
│ │ │ │ └── jsonify@0.0.0
│ │ │ └── har-schema@1.0.5
│ │ ├─┬ http-signature@1.1.1
│ │ │ ├── assert-plus@0.2.0
│ │ │ ├─┬ jsprim@1.4.1
│ │ │ │ ├── assert-plus@1.0.0
│ │ │ │ ├── extsprintf@1.3.0
│ │ │ │ ├── json-schema@0.2.3
│ │ │ │ └─┬ verror@1.10.0
│ │ │ │ └── assert-plus@1.0.0
│ │ │ └─┬ sshpk@1.13.1
│ │ │ ├── asn1@0.2.3
│ │ │ ├── assert-plus@1.0.0
│ │ │ ├── bcrypt-pbkdf@1.0.1
│ │ │ ├─┬ dashdash@1.14.1
│ │ │ │ └── assert-plus@1.0.0
│ │ │ ├── ecc-jsbn@0.1.1
│ │ │ ├─┬ getpass@0.1.7
│ │ │ │ └── assert-plus@1.0.0
│ │ │ ├── jsbn@0.1.1
│ │ │ └── tweetnacl@0.14.5
│ │ ├── is-typedarray@1.0.0
│ │ ├── isstream@0.1.2
│ │ ├── json-stringify-safe@5.0.1
│ │ ├─┬ mime-types@2.1.17
│ │ │ └── mime-db@1.30.0
│ │ ├── oauth-sign@0.8.2
│ │ ├── performance-now@0.2.0
│ │ ├── qs@6.4.0
│ │ ├── safe-buffer@5.1.1
│ │ ├── stringstream@0.0.5
│ │ ├─┬ tough-cookie@2.3.3
│ │ │ └── punycode@1.4.1
│ │ ├── tunnel-agent@0.6.0
│ │ └── uuid@3.1.0
│ ├── semver@5.4.1
│ ├─┬ tar@2.2.1
│ │ ├── block-stream@0.0.9
│ │ ├─┬ fstream@1.0.11
│ │ │ └── graceful-fs@4.1.11
│ │ └── inherits@2.0.3
│ └─┬ tar-pack@3.4.0
│ ├─┬ debug@2.6.9
│ │ └── ms@2.0.0
│ ├── fstream-ignore@1.0.5
│ ├─┬ once@1.4.0
│ │ └── wrappy@1.0.2
│ ├─┬ readable-stream@2.3.3
│ │ ├── core-util-is@1.0.2
│ │ ├── isarray@1.0.0
│ │ ├── process-nextick-args@1.0.7
│ │ ├── string_decoder@1.0.3
│ │ └── util-deprecate@1.0.2
│ └── uid-number@0.0.6
├── reflect-metadata@0.1.10
├─┬ rimraf@2.6.2
│ └─┬ glob@7.1.2
│ ├── fs.realpath@1.0.0
│ ├── inflight@1.0.6
│ ├─┬ minimatch@3.0.4
│ │ └─┬ brace-expansion@1.1.8
│ │ ├── balanced-match@1.0.0
│ │ └── concat-map@0.0.1
│ └── path-is-absolute@1.0.1
├─┬ sqlite3@3.1.13
│ ├── nan@2.7.0
│ └─┬ node-pre-gyp@0.6.38
│ ├─┬ hawk@3.1.3
│ │ ├── boom@2.10.1
│ │ ├── cryptiles@2.0.5
│ │ ├── hoek@2.16.3
│ │ └── sntp@1.0.9
│ ├─┬ mkdirp@0.5.1
│ │ └── minimist@0.0.8
│ ├─┬ nopt@4.0.1
│ │ ├── abbrev@1.1.1
│ │ └─┬ osenv@0.1.4
│ │ ├── os-homedir@1.0.2
│ │ └── os-tmpdir@1.0.2
│ ├─┬ npmlog@4.1.2
│ │ ├─┬ are-we-there-yet@1.1.4
│ │ │ └── delegates@1.0.0
│ │ ├── console-control-strings@1.1.0
│ │ ├─┬ gauge@2.7.4
│ │ │ ├── aproba@1.2.0
│ │ │ ├── has-unicode@2.0.1
│ │ │ ├── object-assign@4.1.1
│ │ │ ├── signal-exit@3.0.2
│ │ │ ├─┬ string-width@1.0.2
│ │ │ │ ├── code-point-at@1.1.0
│ │ │ │ └─┬ is-fullwidth-code-point@1.0.0
│ │ │ │ └── number-is-nan@1.0.1
│ │ │ ├─┬ strip-ansi@3.0.1
│ │ │ │ └── ansi-regex@2.1.1
│ │ │ └── wide-align@1.1.2
│ │ └── set-blocking@2.0.0
│ ├─┬ rc@1.2.1
│ │ ├── deep-extend@0.4.2
│ │ ├── ini@1.3.4
│ │ ├── minimist@1.2.0
│ │ └── strip-json-comments@2.0.1
│ ├─┬ request@2.81.0
│ │ ├── aws-sign2@0.6.0
│ │ ├── aws4@1.6.0
│ │ ├── caseless@0.12.0
│ │ ├─┬ combined-stream@1.0.5
│ │ │ └── delayed-stream@1.0.0
│ │ ├── extend@3.0.1
│ │ ├── forever-agent@0.6.1
│ │ ├─┬ form-data@2.1.4
│ │ │ └── asynckit@0.4.0
│ │ ├─┬ har-validator@4.2.1
│ │ │ ├─┬ ajv@4.11.8
│ │ │ │ ├── co@4.6.0
│ │ │ │ └─┬ json-stable-stringify@1.0.1
│ │ │ │ └── jsonify@0.0.0
│ │ │ └── har-schema@1.0.5
│ │ ├─┬ http-signature@1.1.1
│ │ │ ├── assert-plus@0.2.0
│ │ │ ├─┬ jsprim@1.4.1
│ │ │ │ ├── assert-plus@1.0.0
│ │ │ │ ├── extsprintf@1.3.0
│ │ │ │ ├── json-schema@0.2.3
│ │ │ │ └─┬ verror@1.10.0
│ │ │ │ └── assert-plus@1.0.0
│ │ │ └─┬ sshpk@1.13.1
│ │ │ ├── asn1@0.2.3
│ │ │ ├── assert-plus@1.0.0
│ │ │ ├── bcrypt-pbkdf@1.0.1
│ │ │ ├─┬ dashdash@1.14.1
│ │ │ │ └── assert-plus@1.0.0
│ │ │ ├── ecc-jsbn@0.1.1
│ │ │ ├─┬ getpass@0.1.7
│ │ │ │ └── assert-plus@1.0.0
│ │ │ ├── jsbn@0.1.1
│ │ │ └── tweetnacl@0.14.5
│ │ ├── is-typedarray@1.0.0
│ │ ├── isstream@0.1.2
│ │ ├── json-stringify-safe@5.0.1
│ │ ├─┬ mime-types@2.1.17
│ │ │ └── mime-db@1.30.0
│ │ ├── oauth-sign@0.8.2
│ │ ├── performance-now@0.2.0
│ │ ├── qs@6.4.0
│ │ ├── safe-buffer@5.1.1
│ │ ├── stringstream@0.0.5
│ │ ├─┬ tough-cookie@2.3.3
│ │ │ └── punycode@1.4.1
│ │ ├── tunnel-agent@0.6.0
│ │ └── uuid@3.1.0
│ ├─┬ rimraf@2.6.2
│ │ └─┬ glob@7.1.2
│ │ ├── fs.realpath@1.0.0
│ │ ├── inflight@1.0.6
│ │ ├─┬ minimatch@3.0.4
│ │ │ └─┬ brace-expansion@1.1.8
│ │ │ ├── balanced-match@1.0.0
│ │ │ └── concat-map@0.0.1
│ │ └── path-is-absolute@1.0.1
│ ├── semver@5.4.1
│ ├─┬ tar@2.2.1
│ │ ├── block-stream@0.0.9
│ │ ├─┬ fstream@1.0.11
│ │ │ └── graceful-fs@4.1.11
│ │ └── inherits@2.0.3
│ └─┬ tar-pack@3.4.0
│ ├─┬ debug@2.6.9
│ │ └── ms@2.0.0
│ ├── fstream-ignore@1.0.5
│ ├─┬ once@1.4.0
│ │ └── wrappy@1.0.2
│ ├─┬ readable-stream@2.3.3
│ │ ├── core-util-is@1.0.2
│ │ ├── isarray@1.0.0
│ │ ├── process-nextick-args@1.0.7
│ │ ├── string_decoder@1.0.3
│ │ └── util-deprecate@1.0.2
│ └── uid-number@0.0.6
├─┬ typeorm@0.1.0-alpha.49
│ ├── app-root-path@2.0.1
│ ├─┬ chalk@2.1.0
│ │ ├─┬ ansi-styles@3.2.0
│ │ │ └─┬ color-convert@1.9.0
│ │ │ └── color-name@1.1.3
│ │ ├── escape-string-regexp@1.0.5
│ │ └─┬ supports-color@4.4.0
│ │ └── has-flag@2.0.0
│ ├─┬ cli-highlight@1.1.4
│ │ ├─┬ chalk@1.1.3
│ │ │ ├── ansi-styles@2.2.1
│ │ │ ├── has-ansi@2.0.0
│ │ │ └── supports-color@2.0.0
│ │ ├── he@1.1.1
│ │ ├── highlight.js@9.12.0
│ │ ├─┬ mz@2.7.0
│ │ │ ├── any-promise@1.3.0
│ │ │ └─┬ thenify-all@1.6.0
│ │ │ └── thenify@3.3.0
│ │ └─┬ yargs@4.8.1
│ │ ├── lodash.assign@4.2.0
│ │ ├── os-locale@1.4.0
│ │ ├─┬ read-pkg-up@1.0.1
│ │ │ ├─┬ find-up@1.1.2
│ │ │ │ ├── path-exists@2.1.0
│ │ │ │ └─┬ pinkie-promise@2.0.1
│ │ │ │ └── pinkie@2.0.4
│ │ │ └─┬ read-pkg@1.1.0
│ │ │ ├─┬ load-json-file@1.1.0
│ │ │ │ └─┬ strip-bom@2.0.0
│ │ │ │ └── is-utf8@0.2.1
│ │ │ └── path-type@1.1.0
│ │ ├── which-module@1.0.0
│ │ ├── window-size@0.2.0
│ │ └─┬ yargs-parser@2.4.1
│ │ └── camelcase@3.0.0
│ ├── dotenv@4.0.0
│ ├─┬ js-yaml@3.10.0
│ │ ├─┬ argparse@1.0.9
│ │ │ └── sprintf-js@1.0.3
│ │ └── esprima@4.0.0
│ ├─┬ xml2js@0.4.19
│ │ ├── sax@1.2.4
│ │ └── xmlbuilder@9.0.4
│ ├─┬ yargonaut@1.1.2
│ │ ├─┬ chalk@1.1.3
│ │ │ ├── ansi-styles@2.2.1
│ │ │ └── supports-color@2.0.0
│ │ ├── figlet@1.2.0
│ │ └── parent-require@1.0.0
│ └─┬ yargs@9.0.1
│ ├── camelcase@4.1.0
│ ├─┬ cliui@3.2.0
│ │ └── wrap-ansi@2.1.0
│ ├── decamelize@1.2.0
│ ├── get-caller-file@1.0.2
│ ├─┬ os-locale@2.1.0
│ │ ├─┬ execa@0.7.0
│ │ │ ├─┬ cross-spawn@5.1.0
│ │ │ │ ├─┬ lru-cache@4.1.1
│ │ │ │ │ ├── pseudomap@1.0.2
│ │ │ │ │ └── yallist@2.1.2
│ │ │ │ ├─┬ shebang-command@1.2.0
│ │ │ │ │ └── shebang-regex@1.0.0
│ │ │ │ └─┬ which@1.3.0
│ │ │ │ └── isexe@2.0.0
│ │ │ ├── get-stream@3.0.0
│ │ │ ├── is-stream@1.1.0
│ │ │ ├─┬ npm-run-path@2.0.2
│ │ │ │ └── path-key@2.0.1
│ │ │ ├── p-finally@1.0.0
│ │ │ └── strip-eof@1.0.0
│ │ ├─┬ lcid@1.0.0
│ │ │ └── invert-kv@1.0.0
│ │ └─┬ mem@1.1.0
│ │ └── mimic-fn@1.1.0
│ ├─┬ read-pkg-up@2.0.0
│ │ ├─┬ find-up@2.1.0
│ │ │ └─┬ locate-path@2.0.0
│ │ │ ├─┬ p-locate@2.0.0
│ │ │ │ └── p-limit@1.1.0
│ │ │ └── path-exists@3.0.0
│ │ └─┬ read-pkg@2.0.0
│ │ ├─┬ load-json-file@2.0.0
│ │ │ ├─┬ parse-json@2.2.0
│ │ │ │ └─┬ error-ex@1.3.1
│ │ │ │ └── is-arrayish@0.2.1
│ │ │ ├── pify@2.3.0
│ │ │ └── strip-bom@3.0.0
│ │ ├─┬ normalize-package-data@2.4.0
│ │ │ ├── hosted-git-info@2.5.0
│ │ │ ├─┬ is-builtin-module@1.0.0
│ │ │ │ └── builtin-modules@1.1.1
│ │ │ └─┬ validate-npm-package-license@3.0.1
│ │ │ ├─┬ spdx-correct@1.0.2
│ │ │ │ └── spdx-license-ids@1.2.2
│ │ │ └── spdx-expression-parse@1.0.4
│ │ └── path-type@2.0.0
│ ├── require-directory@2.1.1
│ ├── require-main-filename@1.0.1
│ ├─┬ string-width@2.1.1
│ │ ├── is-fullwidth-code-point@2.0.0
│ │ └─┬ strip-ansi@4.0.0
│ │ └── ansi-regex@3.0.0
│ ├── which-module@2.0.0
│ ├── y18n@3.2.1
│ └── yargs-parser@7.0.0
└── uikit@3.0.0-beta.30
electron-builder 19.36.0
Rebuilding native production dependencies for win32:x64
Packaging app for platform win32 ia32 using electron v1.7.5
Packaging app for platform win32 x64 using electron v1.7.5
Application packaged successfully! [ 'app-builds/angular-electron-starter-win32-ia32',
'app-builds/angular-electron-starter-win32-x64' ]
Process finished with exit code 0
但是当我在 Windows 上运行 .exe 时,出现了我在上面提到的如何找不到 sqlite 包的错误。
最佳答案
SQLite3 是一个原生的 Node.js 模块,所以它不能直接与 Electron 一起使用,除非将其重建为目标 Electron。Electron-builder 将为我们的平台构建原生模块,然后我们可以像往常一样在代码中使用它.
以下是您需要遵循的步骤。
首先,我们需要在您的 package.json 中添加一个安装后步骤:
"scripts": {
"postinstall": "install-app-deps"
...
}
然后安装必要的依赖并构建:
npm install --save-dev electron-builder
npm install --save sqlite3
npm run postinstall
我在 Windows 7(32 位)和 Windows 10(64 位)中使用了相同的程序。我没有遇到任何问题。
关于未找到已安装的 Electron 应用程序 SQLITE 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46696374/
我正在开发一个 SQLite 数据库。数据库已经填满了,但我想重构它。这是我需要做的一个示例: 我目前有一张 table : CREATE TABLE Cars (ID INTEGER PRIMARY
我正在使用 Mono、SQLite、Dapper 和 Dapper 扩展。我可以从数据库中读取数据,但插入不起作用。我正在使用 sqlite 的 Mono 驱动程序。 错误并不能提供太多信息,至少对我
我有一个使用 SQLite 的 Windows Phone 8 应用程序。该应用程序具有许多数据库功能,并包含一个 sqlite 数据库文件,在运行该应用程序时,该文件将被复制到本地文件夹并进行访问。
为 sqlite 创建索引时有排序顺序。 https://sqlite.org/lang_createindex.html Each column name or expression can be
顾名思义,我怀疑如果有一些引用被删除的表会发生什么,例如表的某些字段的索引。 SQLite是否会自动处理?在执行drop命令之前,数据库所有者是否应注意任何实例? 最佳答案 我认为不需要家政服务。 S
我想知道是否有可能将从计数中获得的整数转换为REAL 类似于以下内容(尽管这不起作用) SELECT CAST (COUNT (ColumnA) AS Count) AS REAL) FROM Tab
我无法在SQLite数据库上执行一些更新。我正在Windows上使用SQLite 3 Shell。 我正在运行以下命令: update resovled_chrom_counts set genus
我知道SQLite中的触发器顺序是不确定的(您不能确定将首先执行哪个触发器),但是表约束和触发器之间的关系又如何呢? 我的意思是,假设我在一个列中有一个UNIQUE(或CHECK)约束,并且在该表上有
我的 CustomTags 表可能有一系列“临时”记录,其中 Tag_ID 为 0,并且 Tag_Number 将有一些五位数的值。 定期,我想清理我的 Sqlite 表以删除这些临时值。 例如,我可
我有A,B,C和D的记录。 我的SQL1 SELECT * FROM main_table order by main_table.date desc limit 2返回A和B。 我的SQL2 SEL
select round(836.0)返回836.0 我如何删除sqlite查询中的尾随零。 836.00应该是836 836.440应该是836.44 最佳答案 如果需要836.44,则需要十进制返
我正在研究RQDA中的文本,并且正在使用Firefox SQLite Manager访问数据库,以便可以更轻松地搜索文件。我创建并填充了虚拟表: CREATE VIRTUAL TABLE texts
我有这样的数据: table1 id | part | price 1 | ox900 | 100 2 | ox980 | 200 和 table2 id | part | price 1
我正在尝试将一些数据插入现有的SQLite表中。该表和数据库是使用相同的API创建的,但是由于某种原因,插入操作无效,并且从不给我任何错误消息。 我正在BlackBerry 9550模拟器上对此进行测
例如,我在名为SALARY的列中插入一个值。如果插入的值大于1000,我想将字符串HIGH插入到RANK列中,否则将插入LOW中。 我可以使用SQLite做到吗? 最佳答案 在插入之前使用触发器,然后
假设我有一个包含三列A,B,C的表t1,其中(A,B)包含唯一键(具有数十万行)。由于90%的查询将采用SELECT C FROM t1 WHERE A =?和B = ?,我想我要为A,B和C提供覆盖
在一个SQLite3数据库中,我有一个表“ projects”,其id字段由以下方式组成: [user id]_[user's project id] 例如,用户ID = 45,这是一些数据: 45_
我了解PRAGMA foreign_key和ON DELETE RESTRICT/NO ACTION的概念,但是我面临的是另一种情况。 我需要删除一个父行,但保持与之关联的子行。例如: CREATE
我的c#应用程序从Web服务1读取文件列表,并将完整的文件名插入table1,然后从第二个Web服务读取list并将它们插入到table2。 这些表具有相同的结构,如下所示: create table
我在以下情况下尝试将Record1的ID更新为Record2的ID: 两个表中的名称相同,并且 在Record2中权重更大。 记录1 | ID | Weight | Name | |----|----
我是一名优秀的程序员,十分优秀!