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

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

@ionutss

Description

@ionutss

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions