I have a little problem with postcss, i update this package because of audit issue.
First when i started my app, but i fixed this one by adding
"postcss-preset-env": "^7.2.3",
in my package.json resolutions.
But then, when i tried to build my app, i get the following one, and i dont find anything directly related to this specific
Cannot read properties of undefined (reading 'unprefixed')
complete error here:
https://evilmartians.com/chronicles/postcss-8-plugin-migration
cssnano-util-raw-cache: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration
Failed to compile.⠂⸩ ⠧ : timing npm:load Completed in 32ms
Cannot read properties of undefined (reading 'unprefixed')
CompileError: Begins at CSS selector undefined
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
npm timing command:run-script Completed in 16564ms
npm timing npm Completed in 16715ms
i know it because of
"resolutions": {
"postcss": "^8.2.13",
...
}
if i remove this, the error go away (but my 'yarn audit' rise vulnerabilities)
Can someone help me to understand the error? What kind of css issue can make this error? I found on google that sometimes, empty rules like
.myrules {
}
Can rise error, but not exactly the one i get, and even, i looked each scss file without finding empty rules.
my complete package.json:
{
"name": "x",
"version": "0.1.0",
"private": true,
"dependencies": {
"#redux-offline/redux-offline": "^2.6.0",
"#reduxjs/toolkit": "^1.6.2",
"#testing-library/dom": "^8.11.1",
"#testing-library/jest-dom": "^5.11.4",
"#testing-library/react": "^11.1.0",
"#testing-library/user-event": "^12.1.10",
"#types/jest": "^27.0.3",
"#types/node": "^12.0.0",
"#types/react": "^17.0.0",
"#types/react-dom": "^17.0.0",
"#types/react-router-dom": "^5.3.1",
"#yaireo/tagify": "^4.9.5",
"axios": "^0.24.0",
"date-fns": "^2.28.0",
"dompurify": "^2.3.3",
"dotenv": "^10.0.0",
"enzyme": "^3.11.0",
"i18next": "^21.6.3",
"i18next-browser-languagedetector": "^6.1.2",
"i18next-parser": "^5.4.0",
"jest-webpack-resolver": "^0.3.0",
"moment": "^2.29.1",
"moment-timezone": "^0.5.34",
"react": "^17.0.2",
"react-datepicker": "^4.6.0",
"react-dom": "^17.0.2",
"react-html-parser": "^2.0.2",
"react-i18next": "^11.15.1",
"react-redux": "^7.2.6",
"react-router-dom": "^5.3.0",
"react-scripts": "4.0.3",
"react-test-renderer": "^17.0.2",
"react-transition-group": "^4.4.2",
"redux": "^4.1.1",
"redux-mock-store": "^1.5.4",
"redux-thunk": "^2.4.0",
"sass": "^1.43.3",
"typescript": "^4.1.2",
"url-search-params-polyfill": "^8.1.1",
"web-vitals": "^1.0.1"
},
"scripts": {
"start": "REACT_APP_VERSION=$npm_config_vers REACT_APP_YMD=$npm_config_ymd REACT_APP_CUSTO=$npm_config_customer REACT_APP_ENV=$npm_config_env yarn startenv",
"build": "REACT_APP_VERSION=$npm_config_vers REACT_APP_YMD=$npm_config_ymd REACT_APP_CUSTO=$npm_config_customer REACT_APP_ENV=$npm_config_env yarn buildenv",
"startenv": "sh -ac '. .env.${REACT_APP_CUSTO}.${REACT_APP_ENV}; react-scripts start'",
"buildenv": "sh -ac '. .env.${REACT_APP_CUSTO}.${REACT_APP_ENV}; react-scripts build'",
"test": "jest test --watch --config=jest.config.js",
"trans-extract": "i18next",
"trans-convert-po-to-json": "node scripts/trans-po-to-json.js",
"trans-convert-json-to-po": "node scripts/trans-json-to-po.js"
},
"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"
]
},
"devDependencies": {
"#types/dompurify": "^2.3.1",
"#types/enzyme": "^3.10.10",
"#types/react-datepicker": "^4.3.4",
"#types/react-html-parser": "^2.0.2",
"#types/react-test-renderer": "^17.0.1",
"#types/react-transition-group": "^4.4.4",
"#types/redux-mock-store": "^1.0.3",
"#types/yaireo__tagify": "^4.9.0",
"#wojtekmaj/enzyme-adapter-react-17": "^0.6.5",
"mock-local-storage": "^1.1.19",
"ts-jest": "26.4.2"
},
"resolutions": {
"node-forge": "^1.0.0",
"browserslist": "^4.16.5",
"glob-parent": "^5.1.2",
"immer": "^9.0.6",
"nth-check": "^2.0.1",
"ansi-regex": "^5.0.1",
"nanoid": "^3.1.31",
"postcss": "^8.2.13",
"postcss-preset-env": "^7.2.3",
"follow-redirects": "^1.14.7"
}
}
Related
I am working on AWS, it works for 1 years with no errors.
Today I made some updtes on my code (I didnt update any packages), and It begins to return this.
I am using AWS CodeBuild, and I guess It must be about that (It may be updated or sth.)
But couldnt resolve tthe problem.
Unhandled Runtime Error
TypeError: null is not an object (evaluating 'anchorElement.parentNode')
Call Stack
eval
[native code]
./src/assets/scss/style.scss
file:///var/app/current/.next/static/chunks/pages/_app.js (827:5)
Here's my codebuild variables:
version: 0.2
phases:
install:
runtime-versions:
nodejs: 14
pre_build:
commands:
- printenv > .env
build:
commands:
- echo Installing dependency...
- npm install -g next#12.0.4-canary.10
- npm install
- echo Compiling the Node.js code
- npm run build
post_build:
commands:
- echo Build completed on `date`
artifacts:
files:
- '**/*'
Here's my packages.json
{
"name": "Try this",
"version": "0.1.0",
"private": true,
"engines" : {
"node" : "14"
},
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "node server.js",
"analyze": "cross-env ANALYZE=true next build",
"analyze:server": "cross-env BUNDLE_ANALYZE=server next build",
"analyze:browser": "cross-env BUNDLE_ANALYZE=browser next build"
},
"dependencies": {
"#fullhuman/postcss-purgecss": "^4.1.3",
"#next/bundle-analyzer": "^11.1.2",
"#sentry/nextjs": "^6.11.0",
"#thecodingmachine/redux-toolkit-wrapper": "^1.3.0",
"#tjoskar/react-lazyload-img": "^1.2.3",
"#uppy/core": "^2.3.0",
"#uppy/progress-bar": "^2.1.0",
"#uppy/react": "^2.2.0",
"#uppy/tus": "^2.3.0",
"#uppy/xhr-upload": "^2.1.0",
"axios": "^0.21.1",
"bootstrap": "^4.6.0",
"cross-env": "^7.0.3",
"express": "^4.17.1",
"file-saver": "^2.0.5",
"framer-motion": "^6.2.9",
"heroku-ssl-redirect": "^0.1.1",
"lottie-web": "^5.7.8",
"moment": "2.24.0",
"moment-timezone": "^0.5.28",
"next": "^12.0.4-canary.10",
"next-compose-plugins": "^2.2.1",
"nextjs-progressbar": "0.0.10",
"nprogress": "^0.2.0",
"postcss-flexbugs-fixes": "^5.0.2",
"postcss-preset-env": "^7.4.2",
"react": "^17.0.2",
"react-bootstrap": "^1.0.0",
"react-color-extractor": "^1.1.2",
"react-copy-to-clipboard": "^5.0.3",
"react-countdown": "^2.3.2",
"react-custom-scroll": "^4.2.0",
"react-dom": "^17.0.2",
"react-facebook-pixel": "^1.0.4",
"react-google-recaptcha-v3": "^1.9.8",
"react-hooks-paginator": "^0.4.4",
"react-icons": "^3.11.0",
"react-id-swiper": "^3.0.0",
"react-image-gallery": "^1.1.1",
"react-infinite-scroll-component": "^6.0.0",
"react-input-mask": "^3.0.0-alpha.2",
"react-lightgallery": "^0.6.3",
"react-livechat": "^1.1.1",
"react-lottie": "^1.2.3",
"react-mailchimp-subscribe": "^2.1.0",
"react-modal": "^3.14.3",
"react-modal-video": "^1.2.3",
"react-parallax": "^3.0.3",
"react-redux": "^7.2.0",
"react-scroll": "^1.7.16",
"react-select": "^4.3.1",
"react-slidedown": "^2.4.5",
"react-sticky-box": "^0.9.3",
"react-tippy": "^1.3.4",
"react-toast-notifications": "^2.4.3",
"react-tooltip": "^4.2.21",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.3.0",
"sweetalert2": "^10.16.7",
"swiper": "^6.8.4",
"uuid": "^8.3.2"
},
"devDependencies": {
"#babel/core": "^7.11.6",
"#babel/runtime": "^7.13.10",
"#react-native-community/eslint-config": "^2.0.0",
"#zeit/next-css": "^1.0.1",
"babel-jest": "^26.6.3",
"babel-plugin-module-resolver": "^4.0.0",
"eslint": "^7.13.0",
"eslint-import-resolver-babel-module": "^5.1.2",
"eslint-plugin-import": "^2.22.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "^0.64.0",
"next-purgecss": "^4.0.0",
"react-test-renderer": "17.0.1",
"sass": "^1.26.3"
},
"jest": {
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
],
"moduleNameMapper": {
".+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$": "identity-obj-proxy"
},
"setupFiles": [
"./jest.setup.js"
],
"timers": "fake",
"testEnvironment": "jsdom"
}
}
What could be wrong?
It works on vercel when I try to build,
But It returns error on AWS. (It was working for 1 year)
The build was working fine before installing expo-image-picker. But it's not working now even after removing the package.
This is the build command.
eas build -p android --profile preview2
Both android and ios build failing.
It looks like an image error, i removed all the images from my app but the issue still persists
Here's my package.json
{
"name": "my-app",
"version": "1.0.0",
"scripts": {
"start": "expo start",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"#eva-design/eva": "^2.1.1",
"#expo/webpack-config": "~0.16.2",
"#react-native-async-storage/async-storage": "~1.17.3",
"#react-native-masked-view/masked-view": "^0.2.6",
"#react-navigation/bottom-tabs": "^6.3.1",
"#react-navigation/material-bottom-tabs": "^6.2.1",
"#react-navigation/native": "^6.0.10",
"#react-navigation/native-stack": "^6.6.2",
"#react-navigation/stack": "^6.2.1",
"#sentry/react-native": "^3.4.2",
"#ui-kitten/components": "^5.1.2",
"axios": "^0.27.2",
"expo": "~45.0.0",
"expo-application": "~4.1.0",
"expo-blur": "~11.1.0",
"expo-constants": "~13.1.1",
"expo-dev-client": "~0.9.6",
"expo-device": "~4.2.0",
"expo-image-picker": "~13.1.1",
"expo-linear-gradient": "~11.3.0",
"expo-localization": "~13.0.0",
"expo-notifications": "~0.15.2",
"expo-splash-screen": "~0.15.1",
"expo-status-bar": "~1.3.0",
"expo-updates": "~0.13.1",
"lodash": "^4.17.21",
"moment": "^2.29.3",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-native": "0.68.2",
"react-native-gesture-handler": "~2.2.1",
"react-native-modern-datepicker": "^1.0.0-beta.91",
"react-native-reanimated": "^2.8.0",
"react-native-safe-area-context": "4.2.4",
"react-native-screens": "~3.11.1",
"react-native-svg": "12.3.0",
"react-native-vector-icons": "^9.1.0",
"react-native-web": "0.17.7",
"sentry-expo": "^4.2.0",
"styled-components": "^5.3.5"
},
"devDependencies": {
"#babel/core": "^7.12.9",
"#types/lodash": "^4.14.182",
"#types/react": "~17.0.21",
"#types/react-native": "~0.67.6",
"#types/react-native-vector-icons": "^6.4.10",
"#types/styled-components": "^5.1.25",
"#types/styled-components-react-native": "^5.1.3",
"ts-node": "^10.7.0",
"typescript": "~4.3.5"
},
"private": true
}
I ended up removing all the images I optimized with expo-optimize, deleted node_modules and rebuild yarn or npm install and that did the trick for me. Fortunately I had a back up of the images.
My client app is already published on Google Play and it crashes
It maybe a stupid behavior from me , when I noted it works well for IOS,
I quickly deployed it for Android and published it
I tried to run it in my development environment using
sudo react-native run-android
it makes the below error
What's the potential errors ?
I'm using MAC High Sierra
my package.json file
{
"name": "WOFA",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"accordion-collapse-react-native": "^0.1.10",
"is-email": "^1.0.0",
"native-base": "^2.12.1",
"react": "16.8.3",
"react-native": "0.59.9",
"react-native-easy-grid": "^0.2.1",
"react-native-firebase": "~5.5.4",
"react-native-gesture-handler": "^1.3.0",
"react-native-grid-list": "^1.0.9",
"react-native-image-picker": "^1.0.1",
"react-native-image-slider-show": "^1.0.3",
"react-native-modal": "^11.1.0",
"react-native-paypal-lib": "^1.0.9",
"react-native-side-drawer": "^1.1.7",
"react-native-slider": "^0.11.0",
"react-native-snackbar": "^1.0.1",
"react-native-svg": "^9.5.1",
"react-native-touchable-safe": "^1.1.2",
"react-navigation": "^3.11.0"
},
"devDependencies": {
"#babel/core": "^7.5.0",
"#babel/runtime": "^7.5.1",
"babel-jest": "^24.8.0",
"jest": "^24.8.0",
"metro-react-native-babel-preset": "^0.54.1",
"react-test-renderer": "16.8.3"
},
"jest": {
"preset": "react-native"
}
}
the packages which need native linking are : [react-native-firebase , react-native-gesture-handler , react-native-image-picker , react-native-paypal-lib , react-native-svg]
I got similar error on Windows 10.
In my case the culprit was node v.12.
Uninstall node and install LTS version of node.
(Currently node v.10.16.0)
Best Luck. 👍
I tried editing vue.config.js but failed to resolve issue:
Here is my package.json:
{
"name": "tp-health-test",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"test:unit": "vue-cli-service test:unit"
},
"dependencies": {
"axios": "^0.18.0",
"bootstrap": "^4.3.1",
"bootstrap-vue": "^2.0.0-rc.19",
"chart.js": "^2.8.0",
"firebase": "^5.11",
"register-service-worker": "^1.6.2",
"vue": "^2.6.10",
"vue-chartjs": "^3.4.2",
"vue-class-component": "^7.1.0",
"vue-property-decorator": "^8.1.1",
"vue-router": "^3.0.6",
"vue-slider-component": "^3.0.31",
"vuefire": "^2.0.0-alpha.24",
"vuejs-datepicker": "^1.5.4",
"vuex": "^3.1.1",
"vuex-map-fields": "^1.3.4"
},
"devDependencies": {
"#types/chai": "^4.1.0",
"#types/mocha": "^5.2.4",
"#vue/cli-plugin-pwa": "^3.7.0",
"#vue/cli-plugin-typescript": "^3.7.0",
"#vue/cli-plugin-unit-mocha": "^3.7.0",
"#vue/cli-service": "^3.7.0",
"#vue/test-utils": "1.0.0-beta.29",
"chai": "^4.1.2",
"typescript": "^3.4.5",
"vue-template-compiler": "^2.6.10"
}
}
Terminal output:
Warning: This is a browser-targeted Firebase bundle but it appears it is being
run in a Node environment. If running in a Node environment, make sure you
are using the bundle specified by the "main" field in package.json.
If you are using Webpack, you can specify "main" as the first item in
"resolve.mainFields":
https://webpack.js.org/configuration/resolve/#resolvemainfields
If using Rollup, use the rollup-plugin-node-resolve plugin and set "module"
to false and "main" to true:
https://github.com/rollup/rollup-plugin-node-resolve
RUNTIME EXCEPTION Exception occurred while loading your tests
TypeError: Cannot read property 'stringify' of undefined
at Module../node_modules/#firebase/webchannel-wrapper/dist/index.esm.js (/Users/TP/tp-health-test/dist/webpack:/node_modules/#firebase/webchannel-wrapper/dist/index.esm.js:21:1)
at __webpack_require__ (/Users/TP/tp-health-test/dist/webpack:/webpack/bootstrap:25:1)
at Module../node_modules/#firebase/firestore/dist/index.esm.js (/Users/TP/tp-health-test/dist/webpack:/node_modules/#firebase/firestore/dist/index.esm.js:1:1)
at __webpack_require__ (/Users/TP/tp-health-test/dist/webpack:/webpack/bootstrap:25:1)
at Module../node_modules/firebase/firestore/dist/index.esm.js (/Users/TP/tp-health-test/dist/webpack:/node_modules/firebase/firestore/dist/index.esm.js:1:1)
at __webpack_require__ (/Users/TP/tp-health-test/dist/webpack:/webpack/bootstrap:25:1)
at Module../src/main.ts (/Users/TP/tp-health-test/dist/webpack:/src/main.ts:1:1)
at __webpack_require__ (/Users/TP/tp-health-test/dist/webpack:/webpack/bootstrap:25:1)
I install ember-cli-daterangepicker. I did error server and this had working good, but I get error now. I install anything.
I do ember server and get it
File: ember-cli-daterangepicker/components/date-range-picker.js The
Broccoli Plugin: [broccoli-persistent-filter:Babel] failed with:
Error: incorrect header check
at Zlib._handle.onerror (zlib.js:370:17)
The broccoli plugin was instantiated at:
at Babel.Plugin (F:\Projects\tomaq\node_modules\broccoli-plugin\index.js:7:31)
at Babel.Filter [as constructor] (F:\Projects\tomaq\node_modules\broccoli-persistent-filter\index.js:62:10)
at new Babel (F:\Projects\tomaq\node_modules\broccoli-babel-transpiler\index.js:35:10)
at EmberApp._addonTree (F:\Projects\tomaq\node_modules\ember-cli\lib\broccoli\ember-app.js:913:29)
at EmberApp._processedVendorTree (F:\Projects\tomaq\node_modules\ember-cli\lib\broccoli\ember-app.js:947:20)
at EmberApp._processedExternalTree (F:\Projects\tomaq\node_modules\ember-cli\lib\broccoli\ember-app.js:978:21)
at EmberApp.appAndDependencies (F:\Projects\tomaq\node_modules\ember-cli\lib\broccoli\ember-app.js:1087:30)
at EmberApp.javascript (F:\Projects\tomaq\node_modules\ember-cli\lib\broccoli\ember-app.js:1217:34)
at EmberApp.toArray (F:\Projects\tomaq\node_modules\ember-cli\lib\broccoli\ember-app.js:1646:10)
at EmberApp.toTree (F:\Projects\tomaq\node_modules\ember-cli\lib\broccoli\ember-app.js:1668:30)
at module.exports (F:\Projects\tomaq\ember-cli-build.js:43:14)
at CoreObject.setupBroccoliBuilder (F:\Projects\tomaq\node_modules\ember-cli\lib\models\builder.js:72:19)
at CoreObject.init (F:\Projects\tomaq\node_modules\ember-cli\lib\models\builder.js:52:10)
at CoreObject.superWrapper [as init] (F:\Projects\tomaq\node_modules\core-object\lib\assign-properties.js:32:18)
at CoreObject.Class (F:\Projects\tomaq\node_modules\core-object\core-object.js:32:33)
at CoreObject.run (F:\Projects\tomaq\node_modules\ember-cli\lib\tasks\serve.js:15:19)
at F:\Projects\tomaq\node_modules\ember-cli\lib\commands\serve.js:76:24
at tryCatch (F:\Projects\tomaq\node_modules\rsvp\dist\rsvp.js:539:12)
at invokeCallback (F:\Projects\tomaq\node_modules\rsvp\dist\rsvp.js:554:13)
at publish (F:\Projects\tomaq\node_modules\rsvp\dist\rsvp.js:522:7)
at flush (F:\Projects\tomaq\node_modules\rsvp\dist\rsvp.js:2414:5)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
How fix it problem?
My package.json
{
"name": "tomaq",
"version": "0.0.0",
"description": "Small description for tomaq goes here",
"license": "MIT",
"author": "",
"directories": {
"doc": "doc",
"test": "tests"
},
"repository": "",
"scripts": {
"build": "ember build",
"start": "ember server",
"test": "ember test"
},
"devDependencies": {
"broccoli-asset-rev": "^2.4.5",
"ember-ajax": "^2.4.1",
"ember-cli": "2.10.0",
"ember-cli-app-version": "^2.0.0",
"ember-cli-babel": "^5.1.7",
"ember-cli-daterangepicker": "0.6.0",
"ember-cli-dependency-checker": "^1.3.0",
"ember-cli-g-maps": "0.5.14",
"ember-cli-htmlbars": "^1.0.10",
"ember-cli-htmlbars-inline-precompile": "^0.3.3",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-jshint": "^2.0.1",
"ember-cli-lazy-load": "0.3.0",
"ember-cli-moment-shim": "3.5.0",
"ember-cli-pagination": "3.0.2",
"ember-cli-qunit": "^3.0.1",
"ember-cli-release": "^0.2.9",
"ember-cli-sri": "^2.1.0",
"ember-cli-test-loader": "^1.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-data": "^2.10.0",
"ember-export-application-global": "^1.0.5",
"ember-load-initializers": "^0.5.1",
"ember-moment": "^7.3.1",
"ember-perfectscroll": "0.1.15",
"ember-resolver": "^2.0.3",
"ember-rx-shim": "0.1.4",
"ember-scrollable": "0.4.9",
"ember-simple-pagination": "1.0.1",
"ember-truth-helpers": "1.3.0",
"ember-welcome-page": "^1.0.3",
"gulp": "^3.8.0",
"gulp-compass": "^1.3.3",
"gulp-concat": "^2.2.0",
"gulp-ember-handlebars": "^0.6.0",
"gulp-imagemin": "^3.3.0",
"gulp-uglify": "^0.3.0",
"gulp-watch": "^0.6.5",
"loader.js": "^4.0.10"
},
"engines": {
"node": ">= 0.12.0"
},
"private": true,
"dependencies": {
"bootstrap": "^3.3.7",
"ember-bootstrap": "^1.0.0-beta.1",
"ember-i18n": "^5.0.1",
"ember-validations": "2.0.0-alpha.5",
"gulp": "^3.9.1",
"gulp-shell": "^0.6.3",
"gulp-uglifycss": "^1.0.8"
}
}
it's problem with cache in ember. It was related to running two ember-cli processes in parallel. Change BROCCOLI_PERSISTENT_FILTER_CACHE_ROOT path
BROCCOLI_PERSISTENT_FILTER_CACHE_ROOT=./dist-build-cache ember-cli build -prod
When I see zlib errors, I often need to either restart my ember server or clear my node_modules folder and re-install packages. Does that resolve things for you?