当前位置: 首页 > 工具软件 > ionic-cli > 使用案例 >

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

危斯伯
2023-12-01

今天重启项目的时候运行ionic serve的时候发现报错了,错误代码如下

> ionic-app-scripts serve --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser
[app-scripts] C:\xampp\htdocs\framework\webApp\project\template\node_modules\node-sass\lib\binding.js:13
[app-scripts]       throw new Error(errors.unsupportedEnvironment());
[app-scripts]       ^
[app-scripts] Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (64)
[app-scripts] For more information on which environments are supported please see:
[app-scripts] https://github.com/sass/node-sass/releases/tag/v4.5.0
[app-scripts]     at module.exports (C:\xampp\htdocs\framework\webApp\project\template\node_modules\node-sass\lib\binding.js:13:13)
[app-scripts]     at Object.<anonymous> (C:\xampp\htdocs\framework\webApp\project\template\node_modules\node-sass\lib\index.js:14:35)
[app-scripts]     at Module._compile (internal/modules/cjs/loader.js:701:30)
[app-scripts]     at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
[app-scripts]     at Module.load (internal/modules/cjs/loader.js:600:32)
[app-scripts]     at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
[app-scripts]     at Function.Module._load (internal/modules/cjs/loader.js:531:3)
[app-scripts]     at Module.require (internal/modules/cjs/loader.js:637:17)
[app-scripts]     at require (internal/modules/cjs/helpers.js:22:18)
[app-scripts]     at Object.<anonymous> (C:\xampp\htdocs\framework\webApp\project\template\node_modules\@ionic\app-scripts\dist\core\bundle-components.js:6:16)

[ERROR] ionic-app-scripts has unexpectedly closed (exit code 1).
        
        The Ionic CLI will exit. Please check any output above for error details.

身为小白的我自然是看不太懂的了,只能慢慢摸索着了!
然后发现错误提示上面的一个连接
(C:\xampp\htdocs\framework\webApp\project\template\node_modules@ionic\app-scripts\dist\core\bundle-components.js:6:16)
于是乎我就顺着地址打开了错误位置

var nodeSass = require("node-sass");

就是这一段代码提示出错了,于是乎抱着试试的态度
运行了
cnpm install node-sass
结果:emmm,居然是没有安装,应该是360杀毒软件给我拦截了,
安装中途一直提示是否阻止安装。(血泪啊!安装软件的时候一定要关闭杀毒软件)

 类似资料: