-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
npm install fails #25
Comments
@thpglobal, I had the same issue, and even though this post is older, I want to share an entertaining and comprehensive solution for anyone who stumbles upon this fantastic project and encounters a similar problem! 🚀⚡️ First, clean up your workspace with this command: Now, let's dive into the three common reasons for the error: If you're on a non-INTEL/AMD MacOS, blast off straight to step 3 🚀
Try running
Update your Webpack config file, // Common function to get style loaders
const getStyleLoaders = (cssOptions, preProcessor) => {
const loaders = [
/*... existing loaders ...*/
];
if (preProcessor) {
loaders.push({
loader: require.resolve(preProcessor),
options: {
implementation: preProcessor === 'sass-loader' ? require('sass') : undefined, // Use Dart Sass if preProcessor is sass-loader
},
});
}
return loaders;
}; Ensure there's no mention of Run If everything boots up successfully, update the scripts from @wordpress/gutenberg latest with Fix any minor issues by running the console and troubleshooting accordingly. Enjoy your journey! |
With node v16.4.1 and npm 7.18.1 it gets as far as node_modules/node-sass and fails with sh -c node scripts/build.js and then streams pages of errors starting with:
npm ERR! code 1
npm ERR! path /home/johncoonrod/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js
npm ERR! Building: /usr/bin/node /home/johncoonrod/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm ERR! make: Entering directory '/home/johncoonrod/node_modules/node-sass/build'
npm ERR! g++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DLIBSASS_VERSION="3.5.5"' -I/home/johncoonrod/.node-gyp/16.4.1/include/node -I/home/johncoonrod/.node-gyp/16.4.1/src -I/home/johncoonrod/.node-gyp/16.4.1/deps/openssl/config -I/home/johncoonrod/.node-gyp/16.4.1/deps/openssl/openssl/include -I/home/johncoonrod/.node-gyp/16.4.1/deps/uv/include
The text was updated successfully, but these errors were encountered: