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
When using postInstall.mjs as part of auro-library, the script attempts to reference a relative package.json:
const pjson = require('../package.json');
If a component such as auro-input is referencing postInatll.mjs from auro-library, the install fails since it cannot find a relative package.json inside auro-librarynode_modules:
Error: Cannot find module '../package.json'
Reproducing the error
From your respective component's package.json (for example: auro-input), reference the postInstall.mjs script from auro-library:
chrisfalaska
changed the title
Update postIntsall script to reference package.json
Update postIntsall script to reference package.json absolute path
Oct 18, 2024
chrisfalaska
changed the title
Update postIntsall script to reference package.json absolute path
Update postinstall script to reference component's package.json with an absolute path
Oct 18, 2024
Please describe the bug
When using
postInstall.mjs
as part ofauro-library
, the script attempts to reference a relativepackage.json
:If a component such as
auro-input
is referencingpostInatll.mjs
fromauro-library
, the install fails since it cannot find a relativepackage.json
insideauro-library
node_modules
:Reproducing the error
package.json
(for example:auro-input
), reference thepostInstall.mjs
script fromauro-library
:Run
npm i
Observe build error.
Expected behavior
The
postInstall
script should run fromnode_modules
and reference the consuming component'spackage.json
What browsers are you seeing the problem on?
No response
Additional context
Part of the monorepo work in
auro-form
: AlaskaAirlines/auro-formkit#1Exit criteria
No response
The text was updated successfully, but these errors were encountered: