E:\A Prem World\Team_Work_Tasks\Anjali\Anjali_20160524\QuizApp_20160524_01_Anj>ionic serve -l
(node:4772) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
There is an error in your gulpfile:
Error: Node Sass does not yet support your current environment: Windows 64-bit with false
For more information on which environments are supported please see:
TODO URL
at Object.<anonymous> (E:\A Prem World\Team_Work_Tasks\Anjali\Anjali_20160524\QuizApp_20160524_01_Anj\node_modules\node-sass\lib\index.js:12:11)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Module.require (module.js:466:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (E:\A Prem World\Team_Work_Tasks\Anjali\Anjali_20160524\QuizApp_20160524_01_Anj\node_modules\gulp-sass\index.js:187:21)
at Module._compile (module.js:541:32)
当前回答
我得到这个错误时,我更新节点使用NVM。 去掉这条线; NPM重建node-sass
其他回答
如果没有其他方法,请尝试安装低版本的节点。
查找可用的节点版本
Brew搜索节点
安装低版本,如12
Brew install node@12
断开现有版本的链接
酿造断开节点
使用新版本
酿造链接node@12
如果你得到这样的警告:“警告:node@12是keg-only,必须与——force链接”
Brew link—force—overwrite node@10 echo 'export
更新您的配置并提供资源
PATH="/usr/local/opt/node@12/bin:$PATH"' >> ~/. "bash_profile源 ~ / . bash_profile
我尝试了这个,但它不适合我,并抛出错误:
npm --depth 9999 update
npm rebuild node-sass
我已经安装了最新的Node.js(目前是11.11.0 Current),在遇到这个问题后,我只是做了以下工作:
降级到推荐版本(目前是10.15.3 LTS) 你可以从NodeJS中获取, 删除node_modules和 然后重新安装纱线:
yarn install
yarn start
在执行这些命令之后,一切都运行正常。
在我的情况下,问题是当我安装节点的最新版本,即;10.6.0. 同样的错误显示并参考@Quinn卸载该版本并安装8.11.3 LTS版本。现在工作很好:)
下面的堆栈跟踪链接帮助我解决了这个问题。
Module build failed: Error: Node Sass does not yet support your current environment: Windows 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.7.2
这个链接(https://github.com/sass/node-sass/releases/tag/v4.7.2)清楚地显示了所支持的节点版本。
OS Architecture Node
Windows x86 & x64 0.10, 0.12, 1, 2, 3, 4, 5, 6, 7, 8, 9
... ... ...
将节点版本降级到8.11.1后,再次执行npm install。收到以下信息。
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 8.x
Found bindings for the following environments:
- Windows 64-bit with Unsupported runtime (64)
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.
最后,按照指示运行npm rebuild node-sass——force,一切都开始工作了
如果你使用NVM, VS Code和VS Code任务资源管理器来运行使用node-sass的npm脚本,下面的警告将为你节省一些时间。
I was using VS Code's Task Explorer to run my scripts and have installed multiple Node versions using NVM, defaulting to the current latest version 16. When I opened my VS Code repository and ran nvm use 10 in a new terminal, the Node and npm version in that terminal window correctly downgrades, but the version of node/npm used by the Task Explorer runner remained at Node 16. So when running my webpack script using the VS Code Task Runner, node-sass would still throw the environment error of this question.
解决方案是不使用VS Code任务运行器,在你改变节点版本的终端上运行你的脚本,或者使用下面的命令改变默认的NVM节点版本,重新启动VS Code,然后使用任务资源管理器/运行器。
NVM别名默认10(或任何你需要node-sass兼容性的版本)
推荐文章
- NodeJS -用NPM安装错误
- 如何为本地安装npm包设置自定义位置?
- 如何用分发文件发布npm包?
- 如何判断一个npm包是全局安装还是本地安装
- NodeJS需要一个全局模块/包
- 在MacOS X上推荐用什么方式安装Node.js、nvm和npm ?
- npm install和npm run build有什么区别?
- npm start和npm run start的区别
- 有没有办法修复包锁。json lockfileVersion所以npm使用特定的格式?
- 如何使用npm全局安装一个模块?
- npm犯错!错误:EPERM:操作不允许,重命名
- Node Sass还不支持当前环境:Linux 64位,带false
- 编译typescript时'tsc命令未找到'
- npm不工作-“读取ECONNRESET”
- npm install from Git在特定的版本