A
A
Andrej Sharapov2019-09-11 16:34:38
Windows
Andrej Sharapov, 2019-09-11 16:34:38

Is it possible to close tasks for ubuntu/win10?

I'm putting together a site in gallop and ran into a problem:
I have ubuntu at work, a dozen at home.
To perform tasks and process some sass files, it is required gulp-sass node-sass, but it is not installed on the working computer at all and when you run any tasks it gives an error.
Error: Cannot find module 'node-sass'and/or Error: Cannot find module 'gulp-sass'
I.e. workflow is not possible.
IT specialists also cannot solve the problem. Global uninstall/modify/update don't help.
But at the same time, I installed them on my home laptop and work fine at home.
As a result, I get two tasks, for home and work: one does everything through gulp-sass (home), and the other processes the compiled css files selected (by me) (crutches for work).
Essence of the question:
Is it possible to somehow get around this error and how to disable the one installed at home gulp-sass
Commenting on the variable const sass = require('gulp-sass');and tasks does not help.
Previously, ruby-sass worked on ubuntu, but this is also such a solution ...

log during installation

npm install node-sass gulp-sass --save-dev
> [email protected] install ~/node_modules/node-sass
> node scripts/install.js
Cached binary found at ~/.npm/node-sass/4.12.0/linux-x64-64_binding.node
> [email protected] postinstall ~/node_modules/gifsicle
> node lib/install.js
⚠ spawn ~/node_modules/gifsicle/vendor/gifsicle EACCES
⚠ gifsicle pre-build test failed
ℹ compiling from source
✖ Error: Command failed: /bin/sh -c autoreconf -ivf
/bin/sh: 1: autoreconf: not found
at Promise.all.then.arr (~/node_modules/execa/index.js:231:11)
at process._tickCallback (internal/process/next_tick.js:68:7)
> [email protected] postinstall ~/node_modules/node-sass
> node scripts/build.js
Binary found at ~/node_modules/node-sass/vendor/linux-x64-64/binding.node
Testing binary
Binary has a problem: Error: ~/node_modules/node-sass/vendor/linux-x64-64/binding.node: failed to map segment from shared object
at Object.Module._extensions..node (internal/modules/cjs/loader.js:805:18)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at module.exports (~/node_modules/node-sass/lib/binding.js:19:10)
at Object. (~/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
Building the binary locally
Building: /usr/local/bin/node ~/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/local/bin/node',
gyp verb cli '~/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library=' ]
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` succeeded python2 /usr/bin/python2
gyp verb check python version `/usr/bin/python2 -c "import sys; print "2.7.12
gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j
gyp verb get node dir no --target version specified, falling back to host node version: 10.16.0
gyp verb command install [ '10.16.0' ]
gyp verb install input version string "10.16.0"
gyp verb install installing version: 10.16.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 10.16.0
gyp verb build dir attempting to create "build" dir: ~/node_modules/node-sass/build
gyp verb build dir "build" dir needed to be created? ~/node_modules/node-sass/build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: ~/node_modules/node-sass/build/config.gypi
gyp verb config.gypi checking for gypi file: ~/node_modules/node-sass/config.gypi
gyp verb common.gypi checking for gypi file: ~/node_modules/node-sass/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn /usr/bin/python2
gyp info spawn args [ '~/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '~/node_modules/node-sass/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '~/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '~/.node-gyp/10.16.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=~/.node-gyp/10.16.0',
gyp info spawn args '-Dnode_gyp_dir=~/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=~/.node-gyp/10.16.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=~/node_modules/node-sass',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture x64
gyp verb node dev dir ~/.node-gyp/10.16.0
gyp verb `which` succeeded for `make` /usr/bin/make
gyp info spawn make
gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
make: вход в каталог «~/node_modules/node-sass/build»
g++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.4"' -I~/.node-gyp/10.16.0/include/node -I~/.node-gyp/10.16.0/src -I~/.node-gyp/10.16.0/deps/openssl/config -I~/.node-gyp/10.16.0/deps/openssl/openssl/include -I~/.node-gyp/10.16.0/deps/uv/include -I~/.node-gyp/10.16.0/deps/zlib -I~/.node-gyp/10.16.0/deps/v8/include -I../src/libsass/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -std=gnu++1y -std=c++0x -fexceptions -frtti -MMD -MF ./Release/.deps/Release/obj.target/libsass/src/libsass/src/ast.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/ast.o ../src/libsass/src/ast.cpp
make: g++: Команда не найдена
src/libsass.target.mk:150: ошибка выполнения рецепта для цели «Release/obj.target/libsass/src/libsass/src/ast.o»
make: *** [Release/obj.target/libsass/src/libsass/src/ast.o] Ошибка 127
make: выход из каталога «~/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_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 4.4.0-78-generic
gyp ERR! command "/usr/local/bin/node" "~/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd ~/node_modules/node-sass
gyp ERR! node -v v10.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/gifsicle):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] postinstall: `node lib/install.js`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! ~/.npm/_logs/2019-09-11T13_56_53_776Z-debug.log

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vyach Gor, 2019-09-11
@sharnirio

gulp-sass node-sass is required, but it is not installed at all on the working computer
- what are the console errors when installing gulp-sass node-sass modules?
and are these modules exactly in package.json? And then, as an option, when building the assembly at home, you did not install the dependency through the --save-dev flag and now when you npm i from work, you do not install these modules.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question