By using AWS re:Post, you agree to the Terms of Use

Questions tagged with AWS Amplify

Sort by most recent

Browse through the questions and answers listed below or filter and sort to narrow down your results.

AWS Amplify - You attempted to import .../node_modules/console-browserify/index.js which falls outside of the project src/ directory

I keep getting the below error when trying to build on AWS Amplify. I don't really understand the error as the node_modules packages should be built by Amplify. (Or course it's outside the src directory - it's a Node package Is there a solution to this? ``` 2022-07-15T12:18:10.405Z [INFO]: Failed to compile. 2022-07-15T12:18:10.411Z [INFO]: Module not found: Error: You attempted to import /codebuild/output/src341411582/src/react-sol/node_modules/console-browserify/index.js which falls outside of the project src/ directory. Relative imports outside of src/ are not supported. You can either move it inside src/, or add a symlink to it from project's node_modules/. ```` This is my webpack.config.js ``` const NodePolyfillPlugin = require("node-polyfill-webpack-plugin"); module.exports = { plugins: { add: [ new webpack.ProvidePlugin({ process: "process/browser.js", }), new NodePolyfillPlugin({ excludeAliases: ['console-browserify'], //have tried with and without this }), ], }, node: { fs: "empty", }, }; ``` package.json (I've listed everything) ``` { "name": "mb-react", "version": "0.1.0", "private": true, "dependencies": { "@chakra-ui/react": "^2.2.1", "@emailjs/browser": "^3.6.2", "@emotion/react": "^11.9.3", "@emotion/styled": "^11.9.3", "@fontsource/akaya-telivigala": "^4.5.6", "@fontsource/cabin-sketch": "^4.5.7", "@fontsource/sora": "^4.5.8", "@metaplex-foundation/js": "^0.11.7", "@solana-mobile/wallet-adapter-mobile": "^0.0.1-alpha.1", "@solana/pay": "^0.2.0", "@solana/spl-token": "^0.2.0", "@solana/wallet-adapter-base": "^0.9.8", "@solana/wallet-adapter-react": "^0.15.7", "@solana/wallet-adapter-react-ui": "^0.9.9", "@solana/wallet-adapter-wallets": "^0.16.7", "@solana/web3.js": "^1.47.3", "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.0.0", "@testing-library/user-event": "^14.0.0", "@toruslabs/openlogin": "^2.2.0", "@walletconnect/web3-provider": "^1.7.8", "@web3auth/web3auth": "^1.1.0", "antd": "^4.21.0", "aws-sdk": "^2.1170.0", "bignumber.js": "^9.0.2", "bootstrap": "^5.1.3", "ethereumjs-abi": "^0.6.8", "framer-motion": "4.1.17", "fs": "^0.0.1-security", "fs-webpack-plugin": "^3.1.3", "gsap": "^3.10.4", "jquery": "^3.6.0", "moralis": "^1.9.0", "node-polyfill-webpack-plugin": "^2.0.0", "react": "^18.2.0", "react-blockies": "^1.4.1", "react-bootstrap": "^2.4.0", "react-confetti": "^6.1.0", "react-dom": "^18.2.0", "react-moralis": "^1.4.0", "react-router-dom": "^6.3.0", "react-scripts": "^5.0.0", "react-spinners": "^0.12.0", "react-typewriter-effect": "^1.1.0", "react-use": "^17.4.0", "serve": "^13.0.2", "styled-components": "^5.3.5", "swiper": "^8.2.5", "typescript": "^4.7.3", "web-vitals": "^2.1.4", "web3uikit": "^0.1.166" }, "scripts": { "start": "react-app-rewired start", "build": "react-app-rewired build", "test": "react-app-rewired test", "eject": "react-scripts eject" }, "eslintConfig": { "extends": [ "react-app", "react-app/jest" ] }, "browserslist": { "production": [ ">0.2%", "not dead", "not op_mini all" ], "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version", "defaults" ] }, "devDependencies": { "assert": "^2.0.0", "buffer": "^6.0.3", "crypto-browserify": "^3.12.0", "https-browserify": "^1.0.0", "os-browserify": "^0.3.0", "process": "^0.11.10", "react-app-rewired": "^2.2.1", "stream-browserify": "^3.0.0", "stream-http": "^3.2.0", "url": "^0.11.0" }, "browser": { "fs": false, "path": false, "os": false } } ```
0
answers
-1
votes
30
views
asked 3 months ago

Aws cloudfront One or more of the CNAMEs you provided are already associated with a different resource.

Hello everyone I have an issue with CloudFront and I am stuck. I am trying to add an alternate domain name to my CloudFront distribution but I am getting this error ``` One or more of the CNAMEs you provided are already associated with a different resource. ``` I am trying to add www.oldiprillo.dev to the distribution and the error said this cname is used from another resource. Although I have only one CloudFront distribution which i am trying to add an alternate domain name and i have no other resource using this cname. I have been stuck here for days I don't know what is going on. I have a clue that maybe this error is caused by am amplify app i was using this cname but now that app is deleted and maybe the canme allias is still active somehow. I have tried as well to use aws cli and use list-conflicting-aliases command targeting my distribution id and this is the resault I am getting. ``` { "ConflictingAliasesList": { "MaxItems": 100, "Quantity": 1, "Items": [ { "Alias": "oldiprillo.dev", "DistributionId": "******UDRPHSV", "AccountId": "******200621" } ] } } ``` This is very wired because on my aws account there is no distribution ending with "UDRPHSV" and also there is no account id ending with "200621". I dont know who controll this cname allias i dont know how to remove it.
4
answers
0
votes
76
views
asked 3 months ago