Francois Lachance
01/21/2022, 9:28 PMnpm ERR! notarget No matching version found for aws-cdk-lib@1.138.0.
I have the following in my package.json:
"dependencies": {
"aws-cdk-lib": "1.138.0",
"@serverless-stack/cli": "0.59.1",
"@serverless-stack/resources": "0.59.1"
thdxr
01/21/2022, 9:29 PMFrancois Lachance
01/21/2022, 9:32 PMFrancois Lachance
01/21/2022, 9:49 PM> react-scripts build
D:\Development\fasterbuddy\frontend\node_modules\react-scripts\config\webpack.config.js:664
new MiniCssExtractPlugin({
^
TypeError: MiniCssExtractPlugin is not a constructor
at module.exports (D:\Development\fasterbuddy\frontend\node_modules\react-scripts\config\webpack.config.js:664:9)
at Object.<anonymous> (D:\Development\fasterbuddy\frontend\node_modules\react-scripts\scripts\build.js:58:16)
at Module._compile (node:internal/modules/cjs/loader:1097:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1149:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47
Node.js v17.3.0
Error: There was a problem building the "ReactSite" StaticSite.
at ReactStaticSite.buildApp (D:\Development\fasterbuddy\node_modules\@serverless-stack\resources\src\StaticSite.ts:203:15)
at new StaticSite (D:\Development\fasterbuddy\node_modules\@serverless-stack\resources\src\StaticSite.ts:95:24)
at new FrontendStack (D:\Development\fasterbuddy\stacks\FrontendStack.js:10:18)
at Object.main (D:\Development\fasterbuddy\stacks\index.js:18:3)
at Object.<anonymous> (D:\Development\fasterbuddy\.build\run.js:94:16)
at Module._compile (node:internal/modules/cjs/loader:1097:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1149:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
Subprocess exited with error 1
thdxr
01/21/2022, 9:52 PMFrancois Lachance
01/21/2022, 9:54 PMAshishkumar Pandey
01/21/2022, 9:59 PMnode_modules
directory inside your frontend app’s directory and then run npm i
in the terminal from within the frontend app’s directory. This is the usual way to reinstall.Francois Lachance
01/21/2022, 10:09 PMnodemodules
and ran npm i
, but that command didn't seem to do much and the nodemodules
directory did get not re-created.
Ugh!thdxr
01/21/2022, 10:10 PMnode_modules
?thdxr
01/21/2022, 10:10 PMFrancois Lachance
01/21/2022, 10:11 PMFrancois Lachance
01/21/2022, 10:13 PMFrancois Lachance
01/21/2022, 10:23 PMnpm i
finally worked. I did npm list
first, which confirmed that I was missing dependencies, and then npm i
and it is now fetching the missing dependencies.Frank
Francois Lachance
01/24/2022, 3:04 AM> frontend@0.1.0 build
> react-scripts build
/tmp/seed/source/frontend/node_modules/react-scripts/config/webpack.config.js:664
new MiniCssExtractPlugin({
^
TypeError: MiniCssExtractPlugin is not a constructor
at module.exports (/tmp/seed/source/frontend/node_modules/react-scripts/config/webpack.config.js:664:9)
at Object.<anonymous> (/tmp/seed/source/frontend/node_modules/react-scripts/scripts/build.js:58:16)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47
Error: There was a problem building the "ReactSite" StaticSite.
at ReactStaticSite.buildApp (/tmp/seed/source/node_modules/@serverless-stack/resources/src/StaticSite.ts:203:15)
at new StaticSite (/tmp/seed/source/node_modules/@serverless-stack/resources/src/StaticSite.ts:95:24)
at new ReactStaticSite (/tmp/seed/source/node_modules/@serverless-stack/resources/src/ReactStaticSite.ts:43:5)
at new FrontendStack (/tmp/seed/source/stacks/FrontendStack.js:10:18)
at Object.main (/tmp/seed/source/stacks/index.js:18:3)
at Object.<anonymous> (/tmp/seed/source/.build/run.js:94:16)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
Error: Subprocess exited with error 1
at ChildProcess.<anonymous> (/tmp/seed/source/node_modules/aws-cdk/lib/api/cxapp/exec.ts:127:23)
at ChildProcess.emit (events.js:315:20)
at ChildProcess.EventEmitter.emit (domain.js:467:12)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
There was an error synthesizing your app.
ERROR: Error: Subprocess exited with error 1
I think that's related to this: https://github.com/facebook/create-react-app/issues/11930Francois Lachance
01/24/2022, 3:05 AMnpm run build
on my computer earlier today which I fixed by running npm update mini-css-extract-plugin
. I'm not sure how to fix that in Seed.Frank
npm update mini-css-extract-plugin
generate any changes in package.json
and package-lock.json
?Frank