pulumi: Error: package.json export path for ".pnpm/tslib@2.4.0/node_modules/tslib/tslib.js" not found
What happened?
After upgrade we are not able to run pulumi up
successfully
Diagnostics:
pulumi:pulumi:Stack (app-web-app-web.dev):
error: Error: package.json export path for ".pnpm/tslib@2.4.0/node_modules/tslib/tslib.js" not found
at ModuleMap.get (/home/nemesis/workspace/nxapp/node_modules/.pnpm/@pulumi+pulumi@3.35.2/node_modules/@pulumi/runtime/closure/package.ts:214:19)
at Object.getModuleFromPath (/home/nemesis/workspace/nxapp/node_modules/.pnpm/@pulumi+pulumi@3.35.2/node_modules/@pulumi/runtime/closure/package.ts:263:35)
at /home/nemesis/workspace/nxapp/node_modules/.pnpm/@pulumi+pulumi@3.35.2/node_modules/@pulumi/runtime/closure/createClosure.ts:1229:19
at Generator.next (<anonymous>)
at /home/nemesis/workspace/nxapp/node_modules/.pnpm/@pulumi+pulumi@3.35.2/node_modules/@pulumi/pulumi/runtime/closure/createClosure.js:21:71
at new Promise (<anonymous>)
at __awaiter (/home/nemesis/workspace/nxapp/node_modules/.pnpm/@pulumi+pulumi@3.35.2/node_modules/@pulumi/pulumi/runtime/closure/createClosure.js:17:12)
at captureModuleAsync (/home/nemesis/workspace/nxapp/node_modules/.pnpm/@pulumi+pulumi@3.35.2/node_modules/@pulumi/pulumi/runtime/closure/createClosure.js:871:20)
at /home/nemesis/workspace/nxapp/node_modules/.pnpm/@pulumi+pulumi@3.35.2/node_modules/@pulumi/runtime/closure/createClosure.ts:931:19
at Generator.next (<anonymous>)
(node:1359) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 2)
(Use `node --trace-warnings ...` to show where the warning was created)
Steps to reproduce
"@pulumi/pulumi": "~3.35.2",
pulumi up
Expected Behavior
It’s working when downgrading on this version
"@pulumi/pulumi": "~3.24.1",
Actual Behavior
It fails after upgrading pulumi version
Versions used
CLI
Version 3.35.2
Go Version go1.17.11
Go Compiler gc
Host
OS ubuntu
Version 20.04
Arch x86_64
Additional context
It seems related to #8893 @dixler this could be of interest
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you’ve opened one already).
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 2
- Comments: 21 (8 by maintainers)
@dixler good news we solved most of the issues of node_modules deps
following node-linker=hoisted
in
.npmrc
using pnpm in
hoisted
mode makes it compatible with pulumi as of nowwe still have the issue of locating the right
package.json
in the root of our monorepo, still using the bypass that we described previouslyAlso we pushed a Lambda to AWS with this fixes, the Lambda is sent to AWS successfully but when it runs in the cloud it fails, it seems like something is not loaded right.
Here is the log, could be related