You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After installing the node adapter and running yarn build, the output entry.mjs script contains this line:
import{compile}from'path-to-regexp';
This results in an error when script is run:
import { compile } from 'path-to-regexp';
^^^^^^^
SyntaxError: Named export 'compile' not found. The requested module 'path-to-regexp' is a CommonJS module, which may not support all module.exports as named exports.
This is fixed by adding path-to-regexp to noExternal before building.
This error does not happen when using npm or pnpm. Yarn seems to build an entirely different entry script, which is shorter but has these additional dependencies.
What version of
astro
are you using?1.4.4
Are you using an SSR adapter? If so, which one?
Node
What package manager are you using?
yarn
What operating system are you using?
Mac
Describe the Bug
After installing the node adapter and running
yarn build
, the outputentry.mjs
script contains this line:This results in an error when script is run:
This is fixed by adding
path-to-regexp
tonoExternal
before building.This error does not happen when using
npm
orpnpm
. Yarn seems to build an entirely different entry script, which is shorter but has these additional dependencies.Yarn:
pnpm:
Link to Minimal Reproducible Example
https://github.com/Jutanium/repro-node-yarn
Participation
The text was updated successfully, but these errors were encountered: