从Mac到Windows的离子项目

时间:2019-02-24 13:57:39

标签: ionic-framework

我正在处理离子项目,我从git下载了我的同事项目,但是问题是,当我运行离子服务时,他正在Mac上工作,正在Windows上工作,这是我得到的:

> ng run app:serve --host=0.0.0.0 --port=8100
[ng] 'C:\Users\Louay Baccary\IonicWorkspace\SmartBeltIonic\node_modules\.bin\ng' is not recognized as an internal or external command,
[ng] operable program or batch file.

[ERROR] ng has unexpectedly closed (exit code 1).

        The Ionic CLI will exit. Please check any output above for error details.

现在我试图npm运行ng build,我得到了:

ERROR in ./src/global.scss (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./src/global.scss)
Module build failed (from ./node_modules/sass-loader/lib/loader.js):
Error: Missing binding C:\Users\Louay Baccary\IonicWorkspace\SmartBeltIonic\node_modules\node-sass\vendor\win32-x64-64\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 10.x

Found bindings for the following environments:
  - OS X 64-bit with Node.js 10.x

This usually happens because your environment has changed since running `npm install`.

终端建议我尝试npm rebuild node-sass,但没有任何更改

1 个答案:

答案 0 :(得分:0)

尝试删除目录node_module并在运行npm i之后