ionic-team / ionic-team/ionic-cli

Is there some kind of official fix for the node-sass issue with Windows x64?

未關閉
#2,834 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
TypeScript
星號
2k
分支
682
PR 合併指標
30 天內沒有已合併 PR

描述

This is important.

I already posted this in https://github.com/ionic-team/ionic-cli/issues/2817 and fixed it via a very, very ugly way: creating a new fresh Ionic project, and moving all my views and assets there. It worked, but come on, we NEED to have some other type of fix for this serious problem.

It doesn't care if you have the LTS or the latest Node version; it happens on both of them. You get the following message (this is the message that appears after having tried to force rebuild with node 8; believe me, it doesn't work with that version):

```
Error: Missing binding C:\Zerok\dev\StepApp\node_modules\@ionic\app-scripts\node_modules\node-sass\vendor\win32-x64-48\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 6.x

Found bindings for the following environments:
- Windows 64-bit with Node.js 8.x

This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass --force` to build the binding for your current environment.
at module.exports (C:\some\folder\my_project\node_modules\@ionic\app-scripts\node_modules\node-sass\lib\binding.js:15:13)
at Object. (C:\some\folder\my_project\node_modules\@ionic\app-scripts\node_modules\node-sass\lib\index.js:14:35)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (C:\some\folder\my_project\node_modules\@ionic\app-scripts\dist\core\bundle-components.js:6:16)

```

... and that's all. If you do the rebuild thing, you mess everything up and the project won't be served anyways. I already tested everything, but nothing seems to really work. "npm install" for reinstalling the dependencies doesn't seem to work either.

We need a fix for this problem. Otherwise, Windows x64 users are totally left behind and with no option to properly use Ionic, since we're going to have tons of problems with every serious npm/node change we make.

貢獻指南

開啟貢獻指南

研究方向

先查看相關報告 ionic-team/ionic-cli#2817,以及此處顯示的巢狀 @ionic/app-scripts/node_modules/node-sass 錯誤。在提到的 Node.js 版本中重現 Windows x64 上的行為,並檢查 npm 的 rebuild/install 路徑;當 Ionic 專案可以在沒有缺少 binding 或損壞的 rebuild 的情況下完成安裝並執行時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
node.js
領域
build-system, cli
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。