rikhoffbauer / react-abac

Attribute Based Access Control for React
https://rik-hoffbauer.gitlab.io/npm/react-abac/
89 stars 16 forks source link

`pnpm build` fails with exit code `1` #761

Closed rikhoffbauer closed 1 year ago

rikhoffbauer commented 1 year ago

Running the pnpm build command fails with exit code 1.

$ pnpm build
 WARN  Issue while reading "/workspaces/react-abac/.npmrc". Failed to replace env in config: ${NPM_TOKEN}

> react-abac@0.1.56 build /workspaces/react-abac
> rollup -c

(node:5194) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
[!] RollupError: Node tried to load your configuration file as CommonJS even though it is likely an ES module. To resolve this, change the extension of your configuration to ".mjs", set "type": "module" in your package.json file or pass the "--bundleConfigAsCjs" flag.

Original error: Cannot use import statement outside a module
https://rollupjs.org/guide/en/#--bundleconfigascjs
/workspaces/react-abac/rollup.config.js:1
import commonjs from "rollup-plugin-commonjs";
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at internalCompileFunction (node:internal/vm:73:18)
    at wrapSafe (node:internal/modules/cjs/loader:1195:20)
    at Module._compile (node:internal/modules/cjs/loader:1239:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1329:10)
    at Module.load (node:internal/modules/cjs/loader:1133:32)
    at Function.Module._load (node:internal/modules/cjs/loader:972:12)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:168:29)
    at ModuleJob.run (node:internal/modules/esm/module_job:193:25)

 ELIFECYCLE  Command failed with exit code 1.
github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 0.1.11 :tada:

The release is available on:

Your semantic-release bot :package::rocket: