Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sass
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
楚学文
node-sass
Commits
17cfde32
Commit
17cfde32
authored
Sep 16, 2015
by
Michael Mifsud
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1148 from xzyfer/feat/better-binding-error
Provide a useful error message when the binding is not found
parents
8889d120
01f9c181
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
extensions.js
lib/extensions.js
+5
-1
runtime.js
test/runtime.js
+1
-1
No files found.
lib/extensions.js
View file @
17cfde32
...
@@ -147,7 +147,11 @@ sass.getBinaryPath = function(throwIfNotExists) {
...
@@ -147,7 +147,11 @@ sass.getBinaryPath = function(throwIfNotExists) {
}
}
if
(
!
fs
.
existsSync
(
binaryPath
)
&&
throwIfNotExists
)
{
if
(
!
fs
.
existsSync
(
binaryPath
)
&&
throwIfNotExists
)
{
throw
new
Error
([
'`libsass` bindings not found in '
,
binaryPath
,
'. Try reinstalling `node-sass`?'
].
join
(
''
));
throw
new
Error
([
[
'The `libsass` binding was not found in'
,
binaryPath
].
join
(
' '
),
[
'This usually happens because your node version has changed.'
],
[
'Run `npm rebuild node-sass` to build the binding for your current node version.'
],
].
join
(
'
\
n'
));
}
}
return
binaryPath
;
return
binaryPath
;
...
...
test/runtime.js
View file @
17cfde32
...
@@ -205,7 +205,7 @@ describe('library detection', function() {
...
@@ -205,7 +205,7 @@ describe('library detection', function() {
assert
.
throws
(
function
()
{
assert
.
throws
(
function
()
{
fs
.
renameSync
(
originalBin
,
renamedBin
);
fs
.
renameSync
(
originalBin
,
renamedBin
);
process
.
sass
.
getBinaryPath
(
true
);
process
.
sass
.
getBinaryPath
(
true
);
},
/
`libsass` binding
s not found/
);
},
/
The `libsass` binding wa
s not found/
);
fs
.
renameSync
(
renamedBin
,
originalBin
);
fs
.
renameSync
(
renamedBin
,
originalBin
);
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment