limited-rainbow-51650
04/16/2020, 12:42 PM"module": "ES2015"
, then I get the error:
/Users/ringods/Projects/cumundi/blueprints/libraries/packages/network/lib/index.js:1
import * as pulumi from "@pulumi/pulumi";
^^^^^^
SyntaxError: Cannot use import statement outside a module
at wrapSafe (internal/modules/cjs/loader.js:1070:16)
at Module._compile (internal/modules/cjs/loader.js:1120:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
which points me to this article: https://stackoverflow.com/questions/58384179/syntaxerror-cannot-use-import-statement-outside-a-module
The advice is to set "type": "module"
in package.json
. After doing that, yet another error on Node 12.16.2:
Error: Not supported
at requireOrImport (/Users/ringods/Projects/cumundi/blueprints/libraries/node_modules/mocha/lib/esm-utils.js:18:25)
at Object.exports.loadFilesAsync (/Users/ringods/Projects/cumundi/blueprints/libraries/node_modules/mocha/lib/esm-utils.js:28:26)
at Mocha.loadFilesAsync (/Users/ringods/Projects/cumundi/blueprints/libraries/node_modules/mocha/lib/mocha.js:351:19)
at singleRun (/Users/ringods/Projects/cumundi/blueprints/libraries/node_modules/mocha/lib/cli/run-helpers.js:107:15)
*sigh*…