studiobakers / react-ui-toolkit

Bakers Studio's React-based UI Toolkit
MIT License
15 stars 2 forks source link

Cannot run storybook script with Node v14.x #73

Closed edizcelik closed 2 years ago

edizcelik commented 3 years ago
ERROR in ./src/dropdown/list/item/_dropdown-list-item.scss (./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/dropdown/list/item/_dropdown-list-item.scss)
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
Error: Missing binding /Users/edizcelik/Documents/Hipo/react-ui-toolkit/node_modules/node-sass/vendor/darwin-x64-83/binding.node
Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 14.x

Found bindings for the following environments:
  - OS X 64-bit with Node.js 12.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.
    at module.exports (/Users/edizcelik/Documents/Hipo/react-ui-toolkit/node_modules/node-sass/lib/binding.js:15:13)
    at Object.<anonymous> (/Users/edizcelik/Documents/Hipo/react-ui-toolkit/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at getDefaultSassImplementation (/Users/edizcelik/Documents/Hipo/react-ui-toolkit/node_modules/sass-loader/dist/getDefaultSassImplementation.js:24:10)
    at getSassImplementation (/Users/edizcelik/Documents/Hipo/react-ui-toolkit/node_modules/sass-loader/dist/getSassImplementation.js:19:72)
    at Object.loader (/Users/edizcelik/Documents/Hipo/react-ui-toolkit/node_modules/sass-loader/dist/index.js:40:61)
 @ ./src/dropdown/list/item/_dropdown-list-item.scss 2:26-162 43:4-64:5 46:18-154
 @ ./src/dropdown/list/item/DropdownListItem.tsx
 @ ./src/dropdown/list/DropdownList.tsx
 @ ./src/dropdown/Dropdown.tsx
 @ ./stories/1-Dropdown.stories.tsx
 @ ./stories sync \.stories\.tsx$
 @ ./.storybook/config.js
 @ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/config.js (webpack)-hot-middleware/client.js?reload=true&quiet=true

Probably related to node-sass

yasincaliskan commented 3 years ago

It's kinda weird but when deleting node_modules/node-sass directory and run npm install, it works fine even Node v16.x. However, if you change your Node version, it doesn't work v14 or v16.

mfarukkoc commented 3 years ago

@edizcelik Can you please tell me more about how to reproduce the bug? I couldn't reproduce it on Node 14.17.3 and npm 6.14.13 on Windows 10.