我打算在这个应用程序中添加一个新插件,它在ionic服务上运行良好,但当我决定使用ionic cordova构建android时,却出现了这个错误
> npm run ionic:build:before
> project@0.0.1 ionic:build:before /Users/roben/Desktop/ionic/project
> node ./bin/www/script.js
module.js:550
throw err;
^
Error: Cannot find module '/Users/roben/Desktop/ionic/project/bin/www/script.js'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! project@0.0.1 ionic:build:before: `node ./bin/www/script.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the project@0.0.1 ionic:build:before script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/roben/.npm/_logs/2018-09-25T13_12_14_615Z-debug.log
[ERROR] An error occurred while running subprocess npm.
npm run ionic:build:before exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
ionic cordova build android的输出--详细
> npm run ionic:build:before
> project@0.0.1 ionic:build:before /Users/roben/Desktop/ionic/project> node ./bin/www/script.jsmodule.js:550 throw err;
^Error: Cannot find module '/Users/roben/Desktop/ionic/projectbin/www/script.js' at Function.Module._resolveFilename (module.js:548:15) at Function.Module._load (module.js:475:25)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! project@0.0.1 ionic:build:before: `node ./bin/www/script.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the project@0.0.1 ionic:build:before script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/roben/.npm/_logs/2018-09-25T15_55_42_452Z-debug.log
[ERROR] An error occurred while running subprocess npm.
npm run ionic:build:before exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
CurlyBrketssMBP:project roben$ rm -rf node_modules
^C
CurlyBrketssMBP:project roben$
CurlyBrketssMBP:project roben$ rm -rf node_modules
CurlyBrketssMBP:project roben$ npm install
> fsevents@1.2.4 install /Users/roben/Desktop/ionic/project/node_modules/fsevents
> node install
[fsevents] Success: "/Users/roben/Desktop/ionic/project/node_modules/fsevents/lib/binding/Release/node-v57-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
> node-sass@4.9.0 install /Users/roben/Desktop/ionic/project/node_modules/node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.0/darwin-x64-57_binding.node
Download complete ⸩ ⠋ :
Binary saved to /Users/roben/Desktop/ionic/project/node_modules/node-sass/vendor/darwin-x64-57/binding.node
Caching binary to /Users/roben/.npm/node-sass/4.9.0/darwin-x64-57_binding.node
> uglifyjs-webpack-plugin@0.4.6 postinstall /Users/roben/Desktop/ionic/project/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js
> node-sass@4.9.0 postinstall /Users/roben/Desktop/ionic/project/node_modules/node-sass
> node scripts/build.js
Binary found at /Users/roben/Desktop/ionic/project/node_modules/node-sass/vendor/darwin-x64-57/binding.node
Testing binary
Binary is fine
added 901 packages from 742 contributors and audited 4018 packages in 34.635s
found 0 vulnerabilities
CurlyBrketssMBP:project roben$ ionic corodva build android
[ERROR] Unable to find command: corodva build android
_ _
(_) ___ _ __ (_) ___
| |/ _ \| '_ \| |/ __|
| | (_) | | | | | (__
|_|\___/|_| |_|_|\___| CLI PRO 4.1.2
Usage:
$ ionic <command> [<args>] [--help] [--verbose] [--quiet] [--no-interactive] [--no-color] [--confirm] [options]
Global Commands:
config <subcommand> ...... Manage CLI and project config values (subcommands: get,
set, unset)
docs ..................... Open the Ionic documentation website
info ..................... Print project, system, and environment information
login .................... Login to Ionic Pro
logout ................... Logout of Ionic Pro
signup ................... Create an account for Ionic Pro
ssh <subcommand> ......... Commands for configuring SSH keys (subcommands: add,
delete, generate, list, setup, use)
start .................... Create a new project
Project Commands:
build .................... Build web assets and prepare your app for any platform
targets
capacitor <subcommand> ... (beta) Capacitor functionality (subcommands: add, copy,
open, run, sync, update) (alias: cap)
cordova <subcommand> ..... Cordova functionality (subcommands: build, compile,
emulate, platform, plugin, prepare, requirements,
resources, run)
doctor <subcommand> ...... Commands for checking the health of your Ionic project
(subcommands: check, list, treat)
generate ................. Automatically create framework features (alias: g)
git <subcommand> ......... Commands relating to git (subcommands: remote)
integrations <subcommand> Manage various integrations in your app (subcommands:
disable, enable, list)
link ..................... Connect local apps to Ionic Pro
monitoring <subcommand> .. Commands relating to Ionic Pro error monitoring
(subcommands: syncmaps)
serve .................... Start a local dev server for app dev/testing (alias: s)
ssl <subcommand> ......... (experimental) Commands for managing SSL keys &
certificates (subcommands: generate)
CurlyBrketssMBP:project roben$ ionic cordova build android
> npm run ionic:build:before
> project@0.0.1 ionic:build:before /Users/roben/Desktop/ionic/project
> node ./bin/www/script.js
module.js:550
throw err;
^
Error: Cannot find module '/Users/roben/Desktop/ionic/project/bin/www/script.js'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! project@0.0.1 ionic:build:before: `node ./bin/www/script.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the project@0.0.1 ionic:build:before script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/roben/.npm/_logs/2018-09-25T16_22_18_392Z-debug.log
[ERROR] An error occurred while running subprocess npm.
npm run ionic:build:before exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
CurlyBrketssMBP:project roben$ ionic cordova build android --verbose
ionic:cli-utils Terminal info: { tty: true, ci: false } +0ms
ionic:cli-utils CLI global options: { _: [ 'cordova', 'build', 'android' ], help: null,h: null, verbose: true, quiet: null, interactive: true, color: true, confirm: null, json:null, project: null, '--': [] } +4ms
ionic:cli-utils:lib:project Project type from config: Ionic Angular 3 (ionic-angular) +0ms
ionic:cli-utils Project name: undefined +279ms
ionic:cli Context: { binPath: '/usr/local/lib/node_modules/ionic/bin/ionic', libPath: '/usr/local/lib/node_modules/ionic', execPath: '/Users/roben/Desktop/ionic/project', version: '4.1.2' } +0ms
ionic:cli-utils:lib:integrations:cordova:config Using config.xml: /Users/roben/Desktop/ionic/project/config.xml +0ms
ionic:cli-utils:lib:hooks Looking for ionic:build:before npm script. +0ms
ionic:cli-utils:lib:hooks Invoking ionic:build:before npm script. +0ms
> npm run ionic:build:before
> project@0.0.1 ionic:build:before /Users/roben/Desktop/ionic/project
> node ./bin/www/script.js
module.js:550
throw err;
^
Error: Cannot find module '/Users/roben/Desktop/ionic/project/bin/www/script.js'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! project@0.0.1 ionic:build:before: `node ./bin/www/script.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the project@0.0.1 ionic:build:before script.
CurlyBrketssMBP:project roben$ ionic cordova build android --verbose ionic:cli-utils Terminal info: { tty: true, ci: false } +0ms
ionic:cli-utils CLI global options: { _: [ 'cordova', 'build', 'android' ], help: null,
h: null, verbose: true, quiet: null, interactive: true, color: true, confirm: null, json:
null, project: null, '--': [] } +2ms
ionic:cli-utils:lib:project Project type from config: Ionic Angular 3 (ionic-angular) +0
ms
ionic:cli-utils Project name: undefined +132ms
ionic:cli Context: { binPath: '/usr/local/lib/node_modules/ionic/bin/ionic', libPath: '/
usr/local/lib/node_modules/ionic', execPath: '/Users/roben/Desktop/ionic/project', version: '4.1.2' } +0ms
ionic:cli-utils:lib:integrations:cordova:config Using config.xml: /Users/roben/Desktop/i
onic/project/config.xml +0ms
ionic:cli-utils:lib:hooks Looking for ionic:build:before npm script. +0ms
ionic:cli-utils:lib:hooks Invoking ionic:build:before npm script. +0ms
> npm run ionic:build:before
> project@0.0.1 ionic:build:before /Users/roben/Desktop/ionic/project
> node ./bin/www/script.js
module.js:550
throw err;
^
Error: Cannot find module '/Users/roben/Desktop/ionic/project/bin/www/script.js'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! project@0.0.1 ionic:build:before: `node ./bin/www/script.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the project@0.0.1 ionic:build:before script.
CurlyBrketssMBP:project roben$ ionic cordova build android --verbosCurlyBrketssMBP:project roben$ ionic cordova build android --verbose
ionic:cli-utils Terminal info: { tty: true, ci: false } +0ms
ionic:cli-utils CLI global options: { _: [ 'cordova', 'build', 'android' ], help: null,
h: null, verbose: true, quiet: null, interactive: true, color: true, confirm: null, json:
null, project: null, '--': [] } +3ms
ionic:cli-utils:lib:project Project type from config: Ionic Angular 3 (ionic-angular) +0
ms
ionic:cli-utils Project name: undefined +132ms
ionic:cli Context: { binPath: '/usr/local/lib/node_modules/ionic/bin/ionic', libPath: '/
usr/local/lib/node_modules/ionic', execPath: '/Users/roben/Desktop/ionic/project', version: '4.1.2' } +0ms
ionic:cli-utils:lib:integrations:cordova:config Using config.xml: /Users/roben/Desktop/i
onic/project/config.xml +0ms
ionic:cli-utils:lib:hooks Looking for ionic:build:before npm script. +0ms
ionic:cli-utils:lib:hooks Invoking ionic:build:before npm script. +0ms
> npm run ionic:build:before
> project@0.0.1 ionic:build:before /Users/roben/Desktop/ionic/project
> node ./bin/www/script.js
module.js:550
throw err;
^
Error: Cannot find module '/Users/roben/Desktop/ionic/project/bin/www/script.js'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! project@0.0.1 ionic:build:before: `node ./bin/www/script.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the project@0.0.1 ionic:build:before script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/roben/.npm/_logs/2018-09-26T06_32_36_084Z-debug.log
[ERROR] An error occurred while running subprocess npm.
npm run ionic:build:before exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
ionic:cli-framework:utils:process onBeforeExit handler: process.exit received +0ms
ionic:cli-framework:utils:process onBeforeExit handler: running 1 queued functions +0ms
ionic:cli-framework:utils:process onBeforeExit handler: exiting (exit code 1) +23ms
当前节点版本
node -v
v8.12.0
科尔多瓦版
cordova -version
8.0.0
npm版本
npm -v
6.4.1
其他:
"@ionic/app-scripts": "3.2.0",
"@ionic/lab": "1.0.9",
"typescript": "~2.6.2"
附加信息:离子型:
ionic (Ionic CLI) : 4.1.2 (/usr/local/lib/node_modules/ionic) Ionic Framework : ionic-angular 3.9.2 @ionic/app-scripts : 3.2.0
科尔多瓦:
cordova(cordova CLI):8.0.0 cordova平台:android 7.0.0,ios 4.5.5 cordova插件:cordova插件离子键盘2.1.2,cordova外挂离子webview 2.1.4,(和5个其他插件)
系统:
NodeJS:v8.12.0(/usr/本地/bin/节点)npm:6.4.1操作系统:macOS高塞拉Xcode:Xcode 9.4.1构建版本9F2000
我修复了一个脚本文件丢失的错误,所以我必须创建一个新的包含“www/script.js”的目录bin,问题解决了!!
flutter build apk--发布 正在运行分级任务“汇编发布”...已完成 140.3s(!) Gradle task assembleRelease失败,退出代码为%1
我有一个基于Ionic v3构建的项目。通常它是工作的,但是一段时间过去了,现在它抛出了一个错误。 当前配置如下所示: 我收到以下错误: 我试图在应用程序/构建中更改版本。gradle,但这对我帮助不大。 我仍然相信有一些版本不匹配,因为一些更新...当然,我会尝试自己解决这个问题,但是当我这样做的时候,也许你可以给我一个关于如何解决这个问题的好建议。 这是一个完整的构建日志:https://pa
我正在使用改造2和OkHttp3从服务器请求数据。我刚刚添加了脱机缓存代码,但它没有按预期工作。我得到了错误"无法解析主机" 当它试图从缓存中获取检索数据时(没有internet连接时),就会发生这种情况。下面是一段代码片段。 最后,这里有一个结合了所有这些的方法。
java.io.ioException:无法运行程序“/root/android/sdk/build-tools/23.0.1/aapt”:错误=2,没有这样的文件或目录
我正在尝试用Java制作一个与OpenGL(使用LWJGL 2)的窗口。当我尝试运行时,Eclipse BuiltInclassLoader出现了ClassNotFoundException错误。 我期望输出显示一个窗口,这是真正的输出: 线程“main”java.lang.noClassDeffounder中的异常错误:org/lwjgl/lwjglexception在enginetester.
我正在通过官方的反应教程,并希望使用我自己的文本编辑器;所以我按照他们的指示,并一路做到这一点,我创建我的应用程序通过"npx创建-反应-应用我的应用程序"。之后,当我运行命令"npm start"我得到以下结果: 我卸载并重新安装了多个节点;我还尝试添加了一个。我的项目根目录中的env文件如下所述:npm start on new create react app build返回ELIFECYC