我从github下载了代码,当我尝试执行它时(使用ionic serve
命令)我遇到了一个错误
ionic-app-scripts serve --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser
[app-scripts] D:\project-1\project-1\frontend\node_modules\node-sass\lib\binding .js:15
[app-scripts] throw new Error(errors.missingBinary());
[app-scripts] ^
[app-scripts] Error: Missing binding D:\project-1\project-1\frontend\node_module s\node-sass\vendor\win32-x64-64\binding.node
[app-scripts] Node Sass could not find a binding for your current environment: W indows 64-bit with Node.js 10.x
[app-scripts] Found bindings for the following environments:
[app-scripts] - Windows 64-bit with Node.js 8.x
[app-scripts] This usually happens because your environment has changed since ru nning `npm install`.
[app-scripts] Run `npm rebuild node-sass --force` to build the binding for your current environment.
[app-scripts] at module.exports (D:\project-1\project-1\frontend\node_module s\node-sass\lib\binding.js:15:13)
[app-scripts] at Object.<anonymous> (D:\project-1\project-1\frontend\node_mo dules\node-sass\lib\index.js:14:35)
[app-scripts] at Module._compile (internal/modules/cjs/loader.js:689:30)
[app-scripts] at Object.Module._extensions..js (internal/modules/cjs/loader. js:700:10)
[app-scripts] at Module.load (internal/modules/cjs/loader.js:599:32)
[app-scripts] at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
[app-scripts] at Function.Module._load (internal/modules/cjs/loader.js:530:3 )
[app-scripts] at Module.require (internal/modules/cjs/loader.js:637:17)
[app-scripts] at require (internal/modules/cjs/helpers.js:20:18)
[app-scripts] at Object.<anonymous> (D:\project-1\project-1\frontend\node_mo dules\@ionic\app-scripts\dist\core\bundle-components.js:6:16)
[ERROR] A utility CLI has unexpectedly closed (exit code 1).
The Ionic CLI will exit. Please check any output above for error details
我该如何解决这个问题?
删除节点模块并使用npm install再次安装