xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

Node.js & TypeScript error All In One

Node.js & TypeScript error All In One

低版本 Node.js 不支持 TypeScript bug

TS2591: Cannot find name 'process'. Do you need to install type definitions for node? Try npm i --save-dev @types/node and then add 'node' to the types field in your tsconfig.

v 8.9

$ npm i -D @types/node

$ yarn add -D @types/node

v 14

Module build failed (from ../node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ../node_modules/sass-loader/dist/cjs.js):
Error: Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtime (83)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.13.1

https://github.com/sass/node-sass/releases/tag/v4.13.1

CI 升级 node.js v14 后,还需要更新到 "node-sass": "4.14.1";因为 "node-sass": "4.13.1", 不支持 node.js v14

Node.js 升级计划

https://nodejs.org/en/about/releases/

solution

v12.18.0 + node-sass": "4.13.1" ✅

v14.16.0 + node-sass": "4.14.1" ✅

refs



©xgqfrms 2012-2020

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2021-11-14 14:29  xgqfrms  阅读(192)  评论(1编辑  收藏  举报