warn Error on build when running "jspm install"
Opened this issue · 0 comments
ionutss commented
With node v10 and npm v6, running the command "jspm install" will throw errors similar to the one below:
warn Error on build
TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
at maybeCallback (fs.js:159:9)
at Object.fs.writeFile (fs.js:1278:14)
at C:\Workspace<project>\node_modules\jspm-npm\lib\node-conversion.js:296:19
As you can see in the stacktrace, the problem is in "jspm-npm\lib\node-conversion.js:296:19"
A short fix will be to change the line like this:
return fs.writeFile(dirFile, "module.exports = require('./" + dirName + "/index');\n", new Function());
Adding, a callback parameter to fs.writeFile() function.