sintaxi / harp

Static Web Server/Generator/Bundler
http://harpjs.com
5k stars 343 forks source link

problem installing using npm / osx Mojave #644

Closed mrfsrf closed 4 years ago

mrfsrf commented 5 years ago

Hi, tried with sudo and without sudo. I have npm configured so i dont need to super user do. here is log npm -v 6.7.0 node node -v v11.9.0


~/learn_react @ Lukas-MacBook-Pro(lukajuras): npm install -g harp npm WARN deprecated connect@2.30.2: connect 2.x series is deprecated npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen) npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. npm WARN deprecated classifier@0.1.0: Package no longer supported. Contact support@npmjs.com for more info. /usr/local/bin/harp -> /usr/local/lib/node_modules/harp/bin/harp

fsevents@1.2.7 install /usr/local/lib/node_modules/harp/node_modules/fsevents node install

node-pre-gyp WARN Using request for node-pre-gyp https download [fsevents] Success: "/usr/local/lib/node_modules/harp/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node" is installed via remote

node-sass@4.9.3 install /usr/local/lib/node_modules/harp/node_modules/node-sass node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.3/darwin-x64-67_binding.node Cannot download "https://github.com/sass/node-sass/releases/download/v4.9.3/darwin-x64-67_binding.node":

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location try setting a proxy via HTTP_PROXY, e.g.

  export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

  npm config set proxy http://example.com:8080

node-sass@4.9.3 postinstall /usr/local/lib/node_modules/harp/node_modules/node-sass node scripts/build.js

Building: /usr/local/Cellar/node/11.9.0/bin/node /usr/local/lib/node_modules/harp/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/Cellar/node/11.9.0/bin/node', gyp verb cli '/usr/local/lib/node_modules/harp/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 node-gyp@3.8.0 gyp info using node@11.9.0 | darwin | 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/local/bin/python2 gyp verb check python version /usr/local/bin/python2 -c "import sys; print "2.7.15 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: 11.9.0 gyp verb command install [ '11.9.0' ] gyp verb install input version string "11.9.0" gyp verb install installing version: 11.9.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: 11.9.0 gyp verb build dir attempting to create "build" dir: /usr/local/lib/node_modules/harp/node_modules/node-sass/build gyp verb build dir "build" dir needed to be created? /usr/local/lib/node_modules/harp/node_modules/node-sass/build gyp verb build/config.gypi creating config file gyp verb build/config.gypi writing out config file: /usr/local/lib/node_modules/harp/node_modules/node-sass/build/config.gypi gyp verb config.gypi checking for gypi file: /usr/local/lib/node_modules/harp/node_modules/node-sass/config.gypi gyp verb common.gypi checking for gypi file: /usr/local/lib/node_modules/harp/node_modules/node-sass/common.gypi gyp verb gyp gyp format was not specified; forcing "make" gyp info spawn /usr/local/bin/python2 gyp info spawn args [ '/usr/local/lib/node_modules/harp/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 '/usr/local/lib/node_modules/harp/node_modules/node-sass/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/usr/local/lib/node_modules/harp/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/Users/lukajuras/.node-gyp/11.9.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=/Users/lukajuras/.node-gyp/11.9.0', gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/harp/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/Users/lukajuras/.node-gyp/11.9.0/<(target_arch)/node.lib', gyp info spawn args '-Dmodule_root_dir=/usr/local/lib/node_modules/harp/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 /Users/lukajuras/.node-gyp/11.9.0 gyp verb which succeeded for make /usr/bin/make gyp info spawn make gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ] c++ '-DNODE_GYP_MODULE_NAME=binding' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/lukajuras/.node-gyp/11.9.0/include/node -I/Users/lukajuras/.node-gyp/11.9.0/src -I/Users/lukajuras/.node-gyp/11.9.0/deps/openssl/config -I/Users/lukajuras/.node-gyp/11.9.0/deps/openssl/openssl/include -I/Users/lukajuras/.node-gyp/11.9.0/deps/uv/include -I/Users/lukajuras/.node-gyp/11.9.0/deps/zlib -I/Users/lukajuras/.node-gyp/11.9.0/deps/v8/include -I../../nan -Os -gdwarf-2 -mmacosx-version-min=10.7 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++1y -stdlib=libc++ -fno-rtti -fno-exceptions -std=c++11 -MMD -MF ./Release/.deps/Release/obj.target/binding/src/binding.o.d.raw -c -o Release/obj.target/binding/src/binding.o ../src/binding.cpp In file included from ../src/binding.cpp:3: ../src/sass_context_wrapper.h:8:10: fatal error: 'sass/context.h' file not found

include <sass/context.h>

     ^~~~~~~~~~~~~~~~

1 error generated. make: *** [Release/obj.target/binding/src/binding.o] Error 1 gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/harp/node_modules/node-gyp/lib/build.js:262:23) gyp ERR! stack at ChildProcess.emit (events.js:197:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12) gyp ERR! System Darwin 18.2.0 gyp ERR! command "/usr/local/Cellar/node/11.9.0/bin/node" "/usr/local/lib/node_modules/harp/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" gyp ERR! cwd /usr/local/lib/node_modules/harp/node_modules/node-sass gyp ERR! node -v v11.9.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok Build failed with error code: 1 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-sass@4.9.3 postinstall: node scripts/build.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@4.9.3 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! /Users/lukajuras/.npm/_logs/2019-02-06T02_57_13_842Z-debug.log ~/learn_react @ Lukas-MacBook-Pro(lukajuras): sudo npm install -g harp npm WARN deprecated connect@2.30.2: connect 2.x series is deprecated npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen) npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools. npm WARN deprecated classifier@0.1.0: Package no longer supported. Contact support@npmjs.com for more info. /usr/local/bin/harp -> /usr/local/lib/node_modules/harp/bin/harp

fsevents@1.2.7 install /usr/local/lib/node_modules/harp/node_modules/fsevents node install

node-pre-gyp WARN Using request for node-pre-gyp https download node-pre-gyp WARN Pre-built binaries not installable for fsevents@1.2.7 and node@11.9.0 (node-v67 ABI, unknown) (falling back to source compile with node-gyp) node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/local/lib/node_modules/harp/node_modules/fsevents/lib' gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/harp/node_modules/fsevents/build' gyp ERR! System Darwin 18.2.0 gyp ERR! command "/usr/local/Cellar/node/11.9.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/local/lib/node_modules/harp/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node" "--module_name=fse" "--module_path=/usr/local/lib/node_modules/harp/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64" "--napi_version=4" "--node_abi_napi=napi" gyp ERR! cwd /usr/local/lib/node_modules/harp/node_modules/fsevents gyp ERR! node -v v11.9.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/11.9.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/harp/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/usr/local/lib/node_modules/harp/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1) node-pre-gyp ERR! stack at ChildProcess. (/usr/local/lib/node_modules/harp/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:197:13) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:978:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5) node-pre-gyp ERR! System Darwin 18.2.0 node-pre-gyp ERR! command "/usr/local/Cellar/node/11.9.0/bin/node" "/usr/local/lib/node_modules/harp/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd /usr/local/lib/node_modules/harp/node_modules/fsevents node-pre-gyp ERR! node -v v11.9.0 node-pre-gyp ERR! node-pre-gyp -v v0.10.3 node-pre-gyp ERR! not ok Failed to execute '/usr/local/Cellar/node/11.9.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/harp/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/usr/local/lib/node_modules/harp/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)

node-sass@4.9.3 install /usr/local/lib/node_modules/harp/node_modules/node-sass node scripts/install.js

Unable to save binary /usr/local/lib/node_modules/harp/node_modules/node-sass/vendor/darwin-x64-67 : { Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/harp/node_modules/node-sass/vendor' at Object.mkdirSync (fs.js:774:3) at sync (/usr/local/lib/node_modules/harp/node_modules/mkdirp/index.js:71:13) at Function.sync (/usr/local/lib/node_modules/harp/node_modules/mkdirp/index.js:77:24) at checkAndDownloadBinary (/usr/local/lib/node_modules/harp/node_modules/node-sass/scripts/install.js:114:11) at Object. (/usr/local/lib/node_modules/harp/node_modules/node-sass/scripts/install.js:157:1) at Module._compile (internal/modules/cjs/loader.js:734:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:745:10) at Module.load (internal/modules/cjs/loader.js:626:32) at tryModuleLoad (internal/modules/cjs/loader.js:566:12) at Function.Module._load (internal/modules/cjs/loader.js:558:3) errno: -13, syscall: 'mkdir', code: 'EACCES', path: '/usr/local/lib/node_modules/harp/node_modules/node-sass/vendor' }

node-sass@4.9.3 postinstall /usr/local/lib/node_modules/harp/node_modules/node-sass node scripts/build.js

Building: /usr/local/Cellar/node/11.9.0/bin/node /usr/local/lib/node_modules/harp/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/Cellar/node/11.9.0/bin/node', gyp verb cli '/usr/local/lib/node_modules/harp/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 node-gyp@3.8.0 gyp info using node@11.9.0 | darwin | 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/local/bin/python2 gyp verb check python version /usr/local/bin/python2 -c "import sys; print "2.7.15 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: 11.9.0 gyp verb command install [ '11.9.0' ] gyp verb install input version string "11.9.0" gyp verb install installing version: 11.9.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: 11.9.0 gyp verb build dir attempting to create "build" dir: /usr/local/lib/node_modules/harp/node_modules/node-sass/build gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/harp/node_modules/node-sass/build' gyp ERR! System Darwin 18.2.0 gyp ERR! command "/usr/local/Cellar/node/11.9.0/bin/node" "/usr/local/lib/node_modules/harp/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" gyp ERR! cwd /usr/local/lib/node_modules/harp/node_modules/node-sass gyp ERR! node -v v11.9.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: fsevents@1.2.7 (node_modules/harp/node_modules/fsevents): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 install: node install npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-sass@4.9.3 postinstall: node scripts/build.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@4.9.3 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! /Users/lukajuras/.npm/_logs/2019-02-06T03_00_11_764Z-debug.log ~/learn_react @ Lukas-MacBook-Pro(lukajuras): node -v v11.9.0 ~/learn_react @ Lukas-MacBook-Pro(lukajuras): sudo npm uninstall -g harp Password: up to date in 0.04s ~/learn_react @ Lukas-MacBook-Pro(lukajuras): harp -v -bash: harp: command not found ~/learn_react @ Lukas-MacBook-Pro(lukajuras): npm install -g name-to-imdb

npm ERR! A complete log of this run can be found in: npm ERR! /Users/lukajuras/.npm/_logs/2019-02-06T03_09_49_271Z-debug.log

gabriel-sevecek commented 5 years ago

I belive you can fix error you're getting ../src/sass_context_wrapper.h:8:10: fatal error: 'sass/context.h' file not found by installing libsass, eg using brew: brew install libsass.

But after that I got another error: error: use of undeclared identifier 'sass_option_push_import_extension'

That extension was remove with latest release of libsass which latest version of node-sass uses. I'm not really familiar with npm so I don't know how to tell npm to install harp with specific version of node-sass, but if you don't mind downgrading node to version 10, do that and you can install harp.

forby commented 5 years ago

I'm getting the same thing

eddietohier commented 5 years ago

me too... please help

tanatwat commented 5 years ago

Try using LTS version of node

You can switch to LTS version via nvm by nvm install --lts and then you should be able to install harp.

This worked for me.

elliotbirchoptus commented 5 years ago

Has anyone solved this? Nothing in this thread solved the issue for me.

mind-ashish commented 5 years ago

Add this in the end of command: --unsafe-perm=true

jkuebart commented 5 years ago

The problem is that something is requiring node-sass@4.9.3, but Node 11 isn't supported before node-sass@4.10.0. So you need to downgrade to Node 10:

$ brew install node@10
$ PATH=/usr/local/opt/node@10/bin:$PATH
$ node --version
v10.16.3

I was able to install harp 0.30.1 this way.

note4 commented 4 years ago

The problem is that something is requiring node-sass@4.9.3, but Node 11 isn't supported before node-sass@4.10.0. So you need to downgrade to Node 10:

$ brew install node@10
$ PATH=/usr/local/opt/node@10/bin:$PATH
$ node --version
v10.16.3

I was able to install harp 0.30.1 this way.

node v10.14.1

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.12.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-sass@4.12.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
jkuebart commented 4 years ago

@note4 Your version of node is too old. The dependency on node-sass has been upgraded to v4.12.0, so you can now install harp with the default version of node without problems (at least on macOS Catalina):

$ brew install node
$ node --version
v12.4.0
$ npm install harp
$ npx harp --version
0.31.0
sintaxi commented 4 years ago

No issues installing on node v8 here.

AgustinUllmer commented 4 years ago

The problem is that something is requiring node-sass@4.9.3, but Node 11 isn't supported before node-sass@4.10.0. So you need to downgrade to Node 10:

$ brew install node@10
$ PATH=/usr/local/opt/node@10/bin:$PATH
$ node --version
v10.16.3

I was able to install harp 0.30.1 this way.

This work for me in MacOs Catalina, thank you! 🙂