我尝试构建我的应用程序,但收到错误消息。我正在使用:
下面的错误
C:\Users\ville\Documents\gobus-hibrido>ionic cordova build android --verbose
ionic:lib Terminal info: { ci: false, shell: 'C:\\WINDOWS\\system32\\cmd.exe', tty: true, windows: true } +0ms
ionic:lib 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:lib:project Project type from config: Ionic 1 (ionic1) +0ms
ionic:lib:project Project details: { configPath: 'C:\\Users\\ville\\Documents\\gobus-hibrido\\ionic.config.json', errors: [], context: 'app', type: 'ionic1' } +1ms
ionic Context: { binPath: 'C:\\Users\\ville\\AppData\\Roaming\\npm\\node_modules\\ionic\\bin\\ionic', libPath: 'C:\\Users\\ville\\AppData\\Roaming\\npm\\node_modules\\ionic', execPath: 'C:\\Users\\ville\\Documents\\gobus-hibrido', version: '5.4.4' } +0ms
ionic:lib:integrations:cordova:config Loading Cordova Config (config.xml: 'C:\\Users\\ville\\Documents\\gobus-hibrido\\config.xml', package.json: 'C:\\Users\\ville\\Documents\\gobus-hibrido\\package.json') +0ms
ionic:lib:build build options: {
ionic:lib:build '--': [],
ionic:lib:build engine: 'cordova',
ionic:lib:build platform: 'android',
ionic:lib:build project: undefined,
ionic:lib:build verbose: false,
ionic:lib:build type: 'ionic1'
ionic:lib:build } +0ms
ionic:lib:telemetry Sending telemetry for command: 'ionic cordova build' [ 'android', '--verbose', '--interactive', '--color' ] +0ms
ionic:lib:hooks Looking for ionic:build:before npm script. +0ms
ionic:lib:build Looking for ionic:build npm script. +8ms
ionic-v1.cmd build
ionic:v1-toolkit:lib:gulp Using gulpfile: C:\Users\ville\Documents\gobus-hibrido\gulpfile.js +0ms
ionic:v1-toolkit:lib:gulp Using gulp: C:\Users\ville\Documents\gobus-hibrido\node_modules\gulp\index.js +4ms
[11:20:02] Cannot load gulp: ReferenceError: primordials is not defined
ionic:v1-toolkit:lib:gulp Using gulpfile: C:\Users\ville\Documents\gobus-hibrido\gulpfile.js +155ms
ionic:v1-toolkit:lib:gulp Using gulp: C:\Users\ville\Documents\gobus-hibrido\node_modules\gulp\index.js +1ms
[11:20:02] Cannot load gulp: ReferenceError: primordials is not defined
[11:20:02] Cannot run sass task: missing in gulpfile.js
ionic:v1-toolkit:lib:gulp Using gulpfile: C:\Users\ville\Documents\gobus-hibrido\gulpfile.js +4ms
ionic:v1-toolkit:lib:gulp Using gulp: C:\Users\ville\Documents\gobus-hibrido\node_modules\gulp\index.js +1ms
[11:20:02] Cannot load gulp: ReferenceError: primordials is not defined
ionic:lib:hooks Looking for ionic:build:after npm script. +461ms
cordova.cmd build android --verbose
[ERROR]运行子进程cordova时发生错误。
cordova.cmd构建android --verbose,退出代码为1。
答案 0 :(得分:0)
请降级/切换到NodeJS 10,这是NodeJS 12和特定依赖项的一个已知问题。或删除锁定文件(package-lock.json),然后重试。