node-sass@2.1.1 install /home/user/Documents/project/node_modules/node-sass
> node scripts/install.js
WARN invalid config loglevel="notice"
Can not download file from https://raw.githubusercontent.com/sass/node-sass-binaries/v2.1.1/linux-x64-node-8.2/binding.node
> node-sass@2.1.1 postinstall /home/user/Documents/project/node_modules/node-sass
> node scripts/build.js
module.js:487
throw err;
^
Error: Cannot find module '/home/user/Documents/project/node_modules/node-sass/node_modules/pangyp/bin/node-gyp'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Function.Module.runMain (module.js:605:10)
at startup (bootstrap_node.js:158:16)
at bootstrap_node.js:575:3
Build failed
added 2186 packages in 42.166s
Run Code Online (Sandbox Code Playgroud)
我到目前为止尝试过:
我正在运行此命令来观看 .scss 文件node-sass-chokidar ./scss -o ./build --watch
如果我在记事本++中编辑文件,一切正常并且文件可以编译。
如果我在 VSCode 中编辑它,然后保存后会出现以下错误:
{
"status": 3,
"message": "File to read not found or unreadable: E:/Clients/conversions/css/scss/mobile.scss",
"formatted": "Internal Error: File to read not found or unreadable: E:/Clients/conversions/css/scss/mobile.scss\n"
}
Run Code Online (Sandbox Code Playgroud)
我发现一些线程说这是由原子保存引起的,但 VSCode 开发人员在 github 线程中说 VSCode 不使用原子保存。但后来在另一个线程中他说它会重命名文件,所以我想这可能是个问题。
有谁知道我该如何解决这个问题并使其正常保存?
更新brew并重新安装node后,设置依赖时出现错误。告诉我如何解决这个问题?
下面的代码不是全部错误,因为字符数有限制,所以只有一部分。
节点 v10.2.1
PHP 7.2.6 (cli)(构建时间:2018 年 5 月 25 日 06:18:43)(NTS)
Python 2.7.10(默认,2017 年 10 月 6 日,22:29:07)
? yarn install --save-dev
yarn install v0.15.1
warning frontend_pack@1.0.0: No license field
warning frontend_pack@1.0.0: Dependency "path" listed in "devDependencies" is the name of a built-in module
[1/4] Resolving packages...
[2/4] Fetching packages...
warning lodash@1.0.2: The engine "rhino" appears to be invalid.
[3/4] Linking dependencies...
warning Unmet peer dependency "jquery@>=1.9.0".
[4/4] Building fresh packages...
[1/1] ? node-sass: not ok
[-/1] ? …Run Code Online (Sandbox Code Playgroud) 我在我的项目中使用 Node SASS 和 Node js。每当我构建(使用 Yarn )我的项目时,我的 Nodejs 都会自动更新到 NodeJS 的最新版本(Node SASS 不支持),因此一段时间后我的构建失败并且应用程序停止工作。
每当我卸载并安装 Nodejs 版本 9 时。项目再次开始工作。
我在 ionic v4 中创建了项目,但在 ./src/global.scss 中出现错误,请参阅下面的错误
>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)
[ng] Module build failed (from ./node_modules/sass-loader/lib/loader.js):
[ng] Error: Cannot find module 'node-sass'
[ng] at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
[ng] at Function.Module._load (internal/modules/cjs/loader.js:507:25)
[ng] at Module.require (internal/modules/cjs/loader.js:637:17)
[ng] at require (internal/modules/cjs/helpers.js:22:18)
[ng] at Object.sassLoader (/home/manish/newionic_workspace/latest100days/node_modules/sass-loader/lib/loader.js:46:72)
[ng] ERROR in ./src/theme/variables.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/theme/variables.scss)
[ng] Module build failed (from ./node_modules/sass-loader/lib/loader.js):
[ng] Error: Cannot find module 'node-sass'
[ng] at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
[ng] at Function.Module._load (internal/modules/cjs/loader.js:507:25)
[ng] at Module.require (internal/modules/cjs/loader.js:637:17)
[ng] at require (internal/modules/cjs/helpers.js:22:18)
[ng] at Object.sassLoader (/home/manish/newionic_workspace
/latest100days/node_modules/sass-loader/lib/loader.js:46:72) …Run Code Online (Sandbox Code Playgroud) 我们是一个致力于 angular 项目的团队。从 repo 下载代码后,当我尝试运行 $npm install 时,我面临以下错误。
我尝试在项目目录下安装 node-gyp、node-sass、删除的 node_modules,但在执行 $npm install 时没有解决问题
../src/create_string.cpp: 在函数 'char* create_string(Nan::MaybeLocal)': ../src/create_string.cpp:17:37: 错误:没有匹配的函数调用 v8::String:: Utf8Value::Utf8Value(v8::Local&)' v8::String::Utf8Value string(value); ^
在 /home/pc-username/.node-gyp/12.7.0/include/node/node.h:63:0 包含的文件中,
Run Code Online (Sandbox Code Playgroud)from ../../../../../nan/nan.h:54, from ../src/create_string.cpp:1: /home/pc-username/.node-gyp/12.7.0/include/node/v8.h:3002:5: note: candidate: v8::String::Utf8Value::Utf8Value(v8::Isolate*, v8::Local<v8::Value>) Utf8Value(Isolate* isolate, Local<v8::Value> obj); ^~~~~~~~~/home/pc-username/.node-gyp/12.7.0/include/node/v8.h:3002:5: 注意:候选人需要 2 个参数,1 个提供 binding.target.mk:127: 目标 'Release 的配方/obj.target/binding/src/create_string.o' 失败
Run Code Online (Sandbox Code Playgroud)make: *** [Release/obj.target/binding/src/create_string.o] Error 1 make: Leaving directory '/home/pc-username/project-folder/project-name/node_modules/@angular-devkit/build-angular/node_modules/node-sass/build' gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit …
错误:Node Sass 尚不支持您当前的环境:Linux 64-bit with Unsupported runtime (72)
我在使用最新版本的 node.js 时遇到了这个问题,即 12.6.0 和 npm 版本 6.9.0。
哪个版本的 node-sass 与上述 node 和 npm 版本兼容。
节点 sass 版本:4.5.3
我第一次尝试在新的 .Net Core 3.1 Web 应用程序上设置 grunt-sass。我已经通过MSFT的步骤去咕噜添加到这里列出一个项目在这里,然后从咕噜-萨斯指示的步骤修改了它在这里。
然而,这会导致任务运行器资源管理器声明没有找到任务。这是我的 package.json:
{
"name": "chapelstudios_www",
"version": "0.0.2",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://me@bitbucket.org/me/chapelstudios_www.git"
},
"author": "mr",
"license": "ISC",
"homepage": "https://bitbucket.org/me/chapelstudios_www#readme",
"private": true,
"devDependencies": {
"grunt": "^1.0.4",
"grunt-cli": "^1.3.2",
"grunt-sass": "^3.1.0",
"node-sass": "^4.13.1"
},
"dependencies": {
"gulp": "^4.0.2"
}
}
Run Code Online (Sandbox Code Playgroud)
这是我的 gruntfile.js:
const sass = require('node-sass');
require('load-grunt-tasks')(grunt);
module.exports = function (grunt) {
// Project …Run Code Online (Sandbox Code Playgroud) gruntjs node-sass grunt-sass-lint visual-studio-2019 .net-core-3.1
我正在开发一个项目,并从 bitbucket 获取了该项目的克隆。当我运行 npm install 时,我遇到了 node-sass 错误。我尝试删除 package-lock 和 node_modules 并再次运行 npm i 。我尝试过升级和更新 npm。我的项目中的其他合作伙伴都没有遇到此错误,并且可以克隆和 npm 我很好。我将在下面发布错误以及我尝试过的一些事情。
我尝试了很好的重新启动和重新启动计算机,我已经卸载并尝试重新安装节点。我已经使用 sudo 运行了该命令,并且删除了 package-lock 和 node_modules。我已经升级和更新了节点(16.0.0),我尝试安装在合作伙伴计算机上运行的确切版本的node-sass(npm i node-sass@4.14.1)
任何建议都会有所帮助!
Blake-MBP:checkout blake$ npm i
npm ERR! code 1
npm ERR! path /Users/directory/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /usr/local/Cellar/node/16.0.0_1/bin/node /Users/directory/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp verb cli [
npm ERR! …Run Code Online (Sandbox Code Playgroud) 我在 package.json 中有以下脚本,与 node-sass-chokidar 一起使用,尝试了多种组合但不起作用。这是我当前的脚本:
build-scss": "npm run update-version && rimraf bundles/* && node-sass-chokidar --include-path ./src --include-path ./node_modules src/ -o dist/css
Run Code Online (Sandbox Code Playgroud)
和
"watch-scss": "npm run build-scss && node-sass-chokidar --watch ./src/ --recursive --include-path ./node_modules -o dist/css"
Run Code Online (Sandbox Code Playgroud)
sass想要用aka替换 node-sass-chokidar dart-sass。
无法找出可以满足现有要求的正确语法。我尝试--load-path了input : output语法。没有运气。