pulumi / pulumi-aws-apigateway

Apache License 2.0
11 stars 5 forks source link

Node aws-apigateway provider fails to install: MODULE_NOT_FOUND #42

Closed t0yv0 closed 2 years ago

t0yv0 commented 2 years ago

What happened?

Failing to resolve aws-apigateway provider through NPM because it cannot find `install-pulumi-plugin.js'.

Steps to reproduce

Step 1:

pulumi new aws-typescript

Step 2:

Edit packages.json to add a dependency on aws-apigateway.

{
    "name": "ts-version",
    "devDependencies": {
        "@types/node": "^14"
    },
    "dependencies": {
        "@pulumi/pulumi": "^3.0.0",
        "@pulumi/aws": "^5.0.0",
        "@pulumi/awsx": "^0.40.0",
        "@pulumi/aws-apigateway": "^0.0.8"
    }
}

Step 3:

npm i

Expected Behavior

Install succeeds.

Actual Behavior

npm i                                                                              ~/tmp/repro/pulumi-java-594/ts-version
npm WARN deprecated read-package-tree@5.3.1: The functionality that this package provided is now in @npmcli/arborist
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated uuid@3.3.2: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm ERR! code 1
npm ERR! path /Users/anton/tmp/repro/pulumi-java-594/ts-version/node_modules/@pulumi/aws-apigateway
npm ERR! command failed
npm ERR! command sh -c node scripts/install-pulumi-plugin.js resource aws-apigateway v0.0.8
npm ERR! node:internal/modules/cjs/loader:936
npm ERR!   throw err;
npm ERR!   ^
npm ERR! 
npm ERR! Error: Cannot find module '/Users/anton/tmp/repro/pulumi-java-594/ts-version/node_modules/@pulumi/aws-apigateway/scripts/install-pulumi-plugin.js'
npm ERR!     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:778:27)
npm ERR!     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
npm ERR!     at node:internal/main/run_main_module:17:47 {
npm ERR!   code: 'MODULE_NOT_FOUND',
npm ERR!   requireStack: []
npm ERR! }

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/anton/.npm/_logs/2022-05-23T19_49_48_838Z-debug-0.log

Versions used

CLI
Version 3.33.1 Go Version go1.17.10 Go Compiler gc

Plugins NAME VERSION nodejs unknown

Host
OS darwin Version 11.6.4 Arch x86_64

This project is written in nodejs (/Users/anton/.nix-profile/bin/node v16.14.2)

Current Stack: dev

Found no resources associated with dev

Found no pending operations associated with dev

Backend
Name pulumi.com URL https://app.pulumi.com/t0yv0 User t0yv0 Organizations t0yv0, pulumi

Pulumi locates its logs in /var/folders/mb/s1jx27m10t3082fqclpgytt80000gn/T/ by default

Additional context

No response

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).

jwadsworth-FHT commented 2 years ago

I am also seeing this exact error. I'm on MacOS except on Apple Silicon (M1), I don't think it matters but just full disclosure.

guineveresaenger commented 2 years ago

This was fixed in v0.0.9