How can I resolve JSPM "Unexpected Identifier" error post-install?

153 views Asked by At

I would like to use JSPM in my project, but it is throwing the following error when I try to run any JSPM command post-install.

C:\Users\username\AppData\Roaming\nvm\v10.15.3\node_modules\jspm\jspm.js:2
import c from "picocolors";
       ^

SyntaxError: Unexpected identifier
    at new Script (vm.js:80:7)
    at createScript (vm.js:274:10)
    at Object.runInThisContext (vm.js:326:10)
    at Module._compile (internal/modules/cjs/loader.js:664:28)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
    at startup (internal/bootstrap/node.js:283:19)

I am using node 10.15.3, npm 6.4.1, and I would like to use JSPM 3.1.0. I have tried uninstalling and reinstalling JSPM and manually installing the picocolors package but those did not work. I also attempted to delete the import statement from jspm.js, but the unexpected identifier error also exists on the following line.

I haven't discovered any solutions to this problem on StackOverflow or elsewhere, so any help would be appreciated.

0

There are 0 answers