Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

warn Error on build when running "jspm install" #177

Open
ionutss opened this issue Sep 11, 2019 · 0 comments
Open

warn Error on build when running "jspm install" #177

ionutss opened this issue Sep 11, 2019 · 0 comments

Comments

@ionutss
Copy link

ionutss commented Sep 11, 2019

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant