sass / node-sass

:rainbow: Node.js bindings to libsass

Home Page:https://npmjs.org/package/node-sass

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wont compile/run on FreeBSD 13

MikeJakubik opened this issue · comments

Hello,

I can't seem to get this to run on node 17 and FreeBSD 13-STABLE, I read the several sass-loader docs (and the npm recommendations) but with no luck. Has anyone managed to get this to work?

./src/domains/dashboard/components/node-view/node-view.scss (./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-6-1!./node_modules/postcss-loader/src??postcss!./node_modules/resolve-url-loader??ref--6-oneOf-6-3!./node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-6-4!./src/domains/dashboard/components/node-view/node-view.scss)
Error: Missing binding /tmp/dashboard/node_modules/node-sass/vendor/freebsd-x64-102/binding.node
Node Sass could not find a binding for your current environment: FreeBSD 64-bit with Node.js 17.x

Found bindings for the following environments:

  • Unknown environment (.DS_Store)
  • OS X 64-bit with Node.js 17.x
  • FreeBSD 64-bit with Node.js 17.x

This usually happens because your environment has changed since running npm install.
Run npm rebuild node-sass to download the binding for your current environment.

  • NPM version (6.14.8):
  • Node version (v17.0.1):
  • Node Process ({ node: '17.0.1', v8: '9.5.172.21-node.12', uv: '1.42.0', zlib: '1.2.11', brotli: '1.0.9', ares: '1.17.2', modules: '102', nghttp2: '1.46.0', napi: '8', llhttp: '6.0.4', openssl: '1.1.1m-freebsd', cldr: '40.0', icu: '70.1', tz: '2021a3', unicode: '14.0' } ):
  • Node Platform (freebsd):
  • Node architecture (x64):
  • node-sass version (/tmp/dashboard/node_modules/node-sass/lib/binding.js:13 throw new Error(errors.unsupportedEnvironment());
    ^

Error: Node Sass does not yet support your current environment: FreeBSD 64-bit with Unsupported runtime (102)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.14.1
at module.exports (/tmp/dashboard/node_modules/node-sass/lib/binding.js:13:13)
at Object. (/tmp/dashboard/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (node:internal/modules/cjs/loader:1095:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1147:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:999:19)
at require (node:internal/modules/cjs/helpers:102:18)
at [eval]:1:1
at Script.runInThisContext (node:vm:129:12)

Node.js v17.0.1
):

  • npm node-sass versions (@netdata/dashboard@2.20.15 /tmp/dashboard └── node-sass@4.14.1 ):

I also see this is npm logs:

16378 verbose stack Error: canvas@2.6.0 install: node-pre-gyp install --fallback-to-build
16378 verbose stack Exit status 1
16378 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
16378 verbose stack at EventEmitter.emit (node:events:390:28)
16378 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
16378 verbose stack at ChildProcess.emit (node:events:390:28)
16378 verbose stack at maybeClose (node:internal/child_process:1062:16)
16378 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
16379 verbose pkgid canvas@2.6.0
16380 verbose cwd /tmp/dashboard
16381 verbose FreeBSD 13.0-STABLE
16382 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "update"
16383 verbose node v17.0.1
16384 verbose npm v6.14.8
16385 error code ELIFECYCLE
16386 error errno 1
16387 error canvas@2.6.0 install: node-pre-gyp install --fallback-to-build
16387 error Exit status 1
16388 error Failed at the canvas@2.6.0 install script.
16388 error This is probably not a problem with npm. There is likely additional logging output above.
16389 verbose exit [ 1, true ]

[root@staging /tmp/dashboard]# npm ls node-saas
@netdata/dashboard@2.20.15 /tmp/dashboard
└── (empty)

Any ideas? Perhaps an easy way to nuke all of .npm (rm -rf .npm?) and issue the proper command to retrieve the right ones? I get this when I tried npm install node-saas.

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'install', 'node-saas' ]
2 info using npm@6.14.8
3 info using node@v17.0.1
4 verbose npm-session ce910690e67ee6c9
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 404 https://registry.npmjs.org/node-saas 423ms
8 http fetch GET 404 https://registry.npmjs.org/node-saas 326ms
9 silly fetchPackageMetaData error for node-saas@latest 404 Not Found - GET https://registry.npmjs.org/node-saas - Not found
10 timing stage:rollbackFailedOptional Completed in 1ms
11 timing stage:runTopLevelLifecycles Completed in 3242ms
12 verbose stack Error: 404 Not Found - GET https://registry.npmjs.org/node-saas - Not found
12 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/npm-registry-fetch/check-response.js:117:15
12 verbose stack     at processTicksAndRejections (node:internal/process/task_queues:96:5)
13 verbose statusCode 404
14 verbose pkgid node-saas@latest
15 verbose cwd /tmp/dashboard
16 verbose FreeBSD 13.0-STABLE
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "node-saas"
18 verbose node v17.0.1
19 verbose npm  v6.14.8
20 error code E404
21 error 404 Not Found - GET https://registry.npmjs.org/node-saas - Not found
22 error 404
23 error 404 'node-saas@latest' is not in the npm registry.
24 error 404 You should bug the author to publish it (or use the name yourself!)
25 error 404 Note that you can also install from a
26 error 404 tarball, folder, http url, or git url.
27 verbose exit [ 1, true ]

In your last output you're misspelling the package name as node-saas instead of node-sass.
In your original post, you have some dependency that is requesting node-sass 4.14.1, which doesn't support Node 17 https://github.com/sass/node-sass#node-version-support-policy

Guess in the end it doesn't really matter, perhaps I can try an older version of node.

[root@staging /tmp/dashboard]# npm ls node-sass
@netdata/dashboard@2.20.15 /tmp/dashboard
└── node-sass@4.14.1

Failed to compile
./src/domains/dashboard/components/node-view/node-view.scss (./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-6-1!./node_modules/postcss-loader/src??postcss!./node_modules/resolve-url-loader??ref--6-oneOf-6-3!./node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-6-4!./src/domains/dashboard/components/node-view/node-view.scss)
Error: Node Sass does not yet support your current environment: FreeBSD 64-bit with Unsupported runtime (102)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.14.1
This error occurred during the build time and cannot be dismissed.
FreeBSD i386 amd64 10, 12, 13

It's gonna be hard to find a packaged of node so old...