Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error occurring in CLI application #6371

Open
molovo opened this issue Feb 5, 2024 · 1 comment
Open

Error occurring in CLI application #6371

molovo opened this issue Feb 5, 2024 · 1 comment
Labels
type: bug code to address defects in shipped code

Comments

@molovo
Copy link

molovo commented Feb 5, 2024

Describe the bug

Error thrown in CLI for all commands, with message to report it here. Error below:

file:///Users/molovo/.files/files/.config/yarn/global/node_modules/@netlify/build/lib/plugins_core/functions/index.js:2
import { RUNTIME, zipFunctions } from '@netlify/zip-it-and-ship-it';
         ^^^^^^^
SyntaxError: Named export 'RUNTIME' not found. The requested module '@netlify/zip-it-and-ship-it' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from '@netlify/zip-it-and-ship-it';
const { RUNTIME, zipFunctions } = pkg;

    at ModuleJob._instantiate (node:internal/modules/esm/module_job:132:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:214:5)
    at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)

  System:
    OS: macOS 13.5.2
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Binaries:
    Node: 20.11.0 - /usr/local/bin/node
    npm: 10.2.4 - /usr/local/bin/npm
  Browsers:
    Chrome: 121.0.6167.139
    Edge: 92.0.902.84
    Safari: 16.6

Steps to reproduce

Run any command in the CLI application

Configuration

Very minimal configuration:

[build]
  publish = "public"
  functions = "_functions"

Environment

  System:
    OS: macOS 13.5.2
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 430.76 MB / 16.00 GB
    Shell: 5.8 - /usr/local/bin/zsh
  Binaries:
    Node: 20.11.0 - /usr/local/bin/node
    npm: 10.2.4 - /usr/local/bin/npm
@molovo molovo added the type: bug code to address defects in shipped code label Feb 5, 2024
@AleksandrHovhannisyan
Copy link

I'm seeing this as well, immediately after installing 16.6.2 or higher. OP, were you able to resolve this by any chance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

No branches or pull requests

2 participants