figmagic: "No such file or directory" error when running figmagic command
Node version: v11.10.0 OS: RHEL 7.6
Steps to reproduce:
- Clone this repo,
cdinto it and runyarn setup - In a new terminal, go to the desired project directory, create
.envfile with figma credentials and runfigmagic
Output:
/usr/bin/env: node --experimental-modules --no-warnings: No such file or directory
It seems that passing node options in the shebang is causing this error, since deleting the --experimental-modules and --no-warnings part makes it run node successfully but then if fails at the first import statement of the script.
/path/to/figmagic/index.mjs:3
import { createFolder } from "./bin/functions/createFolder.mjs";
^
SyntaxError: Unexpected token {
at new Script (vm.js:85:7)
at createScript (vm.js:266:10)
at Object.runInThisContext (vm.js:314:10)
at Module._compile (internal/modules/cjs/loader.js:698:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10)
at Module.load (internal/modules/cjs/loader.js:630:32)
at tryModuleLoad (internal/modules/cjs/loader.js:570:12)
at Function.Module._load (internal/modules/cjs/loader.js:562:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:801:12)
at internal/main/run_main_module.js:21:11
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (9 by maintainers)
The success message is now added in version 2.1.2.