gpt4 book ai didi

ionic-framework - [错误]运行子流程ionic-app-scripts时发生错误

转载 作者:行者123 更新时间:2023-12-04 10:02:46 24 4
gpt4 key购买 nike

我运行 ionic 项目时出现以下错误:
建立Ionic 3应用程式1时发生错误

[ERROR] ionic-app-scripts has unexpectedly closed (exit code 1).

The Ionic CLI will exit. Please check any output above for error details.
ionic3-firebase-shopping-cart-master anand$ ionic cordova run android
> ionic-app-scripts build --target cordova --platform android
/Users/anand/projects/Ionic/ShoppingCart/ionic3-firebase-shopping-cart-master/node_modules/node-sass/lib/binding.js:13
throw new Error(errors.unsupportedEnvironment());
^

Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (64)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.5.3
at module.exports (/Users/anand/projects/Ionic/ShoppingCart/ionic3-firebase-shopping-cart-master/node_modules/node-sass/lib/binding.js:13:13)
at Object.<anonymous> (/Users/anand/projects/Ionic/ShoppingCart/ionic3-firebase-shopping-cart-master/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (internal/modules/cjs/loader.js:678:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
at Module.load (internal/modules/cjs/loader.js:589:32)
at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
at Function.Module._load (internal/modules/cjs/loader.js:520:3)
at Module.require (internal/modules/cjs/loader.js:626:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (/Users/anand/projects/Ionic/ShoppingCart/ionic3-firebase-shopping-cart-master/node_modules/@ionic/app-scripts/dist/core/bundle-components.js:6:16)
[ERROR] An error occurred while running subprocess ionic-app-scripts.

ionic-app-scripts build --target cordova --platform android exited with exit code 1.

Re-running this command with the --verbose flag may provide more information.

ionic3-firebase-shopping-cart-master anand $ ionic cordova platform rm ios

cordova platform remove ios --save Removing platform ios from config.xml file... ionic3-firebase-shopping-cart-master anand$ ionic cordova run android ionic-app-scripts build --target cordova --platform android /Users/anand/projects/Ionic/ShoppingCart/ionic3-firebase-shopping-cart-master/node_modules/node-sass/lib/binding.js:13 throw new Error(errors.unsupportedEnvironment());

最佳答案

经过长时间的尝试,我使用以下命令解决了这个问题:

npm install @ionic/app-scripts@latest --save-dev
而且有效。
另外,如果不起作用,则尝试降级package.json中的应用程序脚本依赖项,如下所示:
"@ionic/app-scripts": "3.2.4"
"@ionic/app-scripts": "3.2.3"
希望能对某人有所帮助

关于ionic-framework - [错误]运行子流程ionic-app-scripts时发生错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53792228/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com