Closed tamtakoe closed 9 years ago
This is a bug with gulp-css-preprocessor. Open an issue with them. On 1 Oct 2015 23:16, "tamtakoe" notifications@github.com wrote:
CentOS 6.7, node-sass 3.3.3 (or old versions)
I use this plugin in gulp-css-preprocessor https://www.npmjs.com/package/gulp-css-preprocessor which is used in my application. When I run npm install first time it works, but next time npm install can throw error:
Error: Command failed: /bin/sh -c gulp build /tmp/app/client/node_modules/arjs-builder/node_modules/gulp-css-preprocessor/node_modules/accord/lib/adapter_base.js:103 throw new Error("'tried to require: " + this.supportedEngines + "'.\nN ^ Error: 'tried to require: node-sass'. None found. Make sure one has been installed! at SCSS.Adapter (/tmp/app/client/node_modules/arjs-builder/node_modules/gulp-css-preprocessor/node_modules/accord/lib/adapter_base.js:103:15) ...
It is corrected if I delete the npm_modules and re-install it.
I write about this problem here because less and stylus plugins work without problem.
— Reply to this email directly or view it on GitHub https://github.com/sass/node-sass/issues/1189.
I'm gulp-css-preprocessor owner. This is not a bug with gulp-css-preprocessor, because I connect all the plugins in the same way through accord, but problem only with node-sass. Accord also use the same way for any plugins (connect with require('pluginName');
).
Check node-sass dependencies. May be the problem in these
We are not using accord, so we don't know. Be aware that node-sass is a native plugin and this means it does not work like every other pure JavaScript-based npm module.
Try to use index.js
in root folder like stylus and less plugins or write path ./lib/index.js
. Maybe node.js works incorrect with such structure of npm module in some situations (node.js contains a lot of bugs associated with paths)
Sounds you're running into the binding not found error, but you're masking it behind a generic Error: 'tried to require: node-sass'.
error message.
There is nothing we can do. I suggest exposing the original error message to users.
I repeated this error on local computer with Windows 7 64x
I require node-sass directly require('D:\\project\\...\\node-sass\\lib\\index.js')
and see:
D:\project\...\node-sass\lib\extensions.js:150
throw new Error([
^
Error: The `libsass` binding was not found in D:\project\...\node-sass\vendor\win32-x64-46\binding.node
I open vendor folder and see only win32-x64-14
folder
When I have deleted npm_modules and reinstalled node-sass I have seen correct win32-x64-64
folder
I repeated this error on local computer with Windows 7 64x
I require node-sass directly
require('D:\\project\\...\\node-sass\\lib\\index.js')
and see:D:\project\...\node-sass\lib\extensions.js:150 throw new Error([ ^ Error: The `libsass` binding was not found in D:\project\...\node-sass\vendor\win32-x64-46\binding.node
I open vendor folder and see only
win32-x64-14
folderWhen I have deleted npm_modules and reinstalled node-sass I have seen correct
win32-x64-64
folder
This is because you have upgraded your node from 0.12 to 4.0 in the meantime.
npm rebuild node-sass might have fixed this as well.
Rather, it's true, but it happened on the server before I updated node.js... I bad remember... It is not important.
But is important that I use several hundred npm modules (including internal dependencies), but only node-sass has same problem. This is an occasion to write more robust code :-)
Rather, it's true, but it happened on the server before I updated node.js... I bad remember... It is not important.
But is important that I use several hundred npm modules (including internal dependencies), but only node-sass has same problem. This is an occasion to write more robust code :-)
How many native modules are you using? Which ones?
In my project I use only two modules: gulp
and arjs-builder
. But they use a lot of submodules
In my project I use only two modules:
gulp
andarjs-builder
. But they use a lot of submodules
It is possible that node-sass is the only native module you are using, that's what I mean. You can't compare pure JavaScript modules with native C++ modules.
CentOS 6.7, node-sass 3.3.3 (or old versions)
I use this plugin in gulp-css-preprocessor which is used in my application. When I run
npm install
first time it works, but next timenpm install
can throw error:It is corrected if I delete the
npm_modules
and re-install it.I write about this problem here because less and stylus plugins work without problem.