I get this strange error:
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.module.rules[1].resolve has an unknown property 'fullySpecified'. These properties are valid:
object { alias?, aliasFields?, cachePredicate?, cacheWithContext?, concord?, descriptionFiles?, enforceExtension?, enforceModuleExtension?, extensions?, fileSystem?, ignoreRootsErrors?, mainFields?, mainFiles?, moduleExtensions?, modules?, plugins?, preferAbsolute?, resolver?, roots?, symlinks?, unsafeCache?, useSyncFileSystemCalls? }
when using sls deploy
(to deploy to aws serverless)
however I don't have a webpack.config.js file nor have I ever set a config setting with "fullySpecified" before.
What I have tried:
searching the project for the term: 'fullySpecified' - it does not exist.
no webpack.config.js (as was originally the code)
a webpack.config.js with a basic config:
module.exports = {
target: 'node',
mode: 'production'
};
What I have found:
https://githubmemory.com/repo/AnomalyInnovations/serverless-bundle/issues/259
Context:
The code is 9 months old and worked last time I was working on it
I used npm update
Operating System: linux
Node Version: 14.16.1
Framework Version: 2.61.0 (local)
Plugin Version: 5.4.5
SDK Version: 4.3.0
Components Version: 3.17.1
package.json:
"dependencies": {
"axios": "0.21.1",
"cors": "2.8.4",
"custom-env": "^2.0.1",
"dotenv": "^8.2.0",
"express": "4.16.4",
"stripe": "6.12.1",
"uuid": "3.3.2",
"aws-sdk": "^2.639.0"
},
"devDependencies": {
"babel-core": "^6.25.0",
"babel-loader": "^7.1.1",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-polyfill": "^6.23.0",
"babel-preset-env": "^1.6.0",
"nodemon": "1.18.4",
"serverless-bundle": "^5.0.2",
"serverless-pseudo-parameters": "^2.5.0",
"serverless-webpack": "^5.5.4",
"webpack": "^5.58.0"
}
Related
I have looked through and tried all of the existing solutions on Stack Overflow. I have:
changed my node version
installed rails:webpacker over and over
deleted node_modules and public/packs folder
ran yarn install, bundle
but I keep getting this error:
Webpacker::Manifest::MissingEntryError
Webpacker can't find hello_react in .../public/packs/manifest.json. Possible causes:
1. You want to set webpacker.yml value of compile to true for your environment
unless you are using the `webpack -w` or the webpack-dev-server.
2. webpack has not yet re-run to reflect updates.
3. You have misconfigured Webpacker's config/webpacker.yml file.
4. Your webpack configuration is not creating a manifest.
Your manifest contains:
{
}
The line giving an error:
<%= javascript_pack_tag 'hello_react' %>
My versions:
node: v16.14.2
Rails 6.0.6
my package.json:
{
"name": "appname",
"private": true,
"dependencies": {
"#babel/preset-react": "^7.18.6",
"#rails/actioncable": "^6.0.0",
"#rails/activestorage": "^6.0.0",
"#rails/ujs": "^6.0.0",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"turbolinks": "^5.2.0",
"webpack": "4.46.0"
},
"version": "0.1.0",
"devDependencies": {
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.11.1"
}
}
I cannot move past this error, what am I missing?
I'm getting a size limit error for my lambda after migrating to serverless webpack! I've migrated to webpack to resolve the issue so something's not right if I'm still getting the same error, see below for the error message.
Many thanks!!
Error message
An error occurred: MainLambdaFunction - Resource handler returned
message: "Unzipped size must be smaller than 262144000 bytes (Service:
Lambda, Status Code: 400, Request ID: ..., Extended Request ID: null)"
(RequestToken: ..., HandlerErrorCode: InvalidRequest).
serverless.yml config
service: my-service-name
frameworkVersion: ">=1.1.0 <3.0.0"
plugins:
- serverless-webpack
custom:
webpack:
includeModules: true
packager: 'yarn'
package:
exclude:
- ./**
- "!node_modules/**"
include:
- js/**
- package.json
provider:
name: aws
runtime: nodejs12.x
stage: staging
region: eu-west-1
memorySize: 1024
timeout: 30
The lambda is using node, so my package.json is included below for reference.
package.json file
"dependencies": {
"aws-sdk": "2.77.0",
"currency-formatter": "^1.2.1",
"dot": "^1.1.2",
"lodash": "4.17.4",
"moment-timezone": "0.5.33",
"pg-native": "^2.2.0",
"source-map-support": "^0.4.2",
"winston": "3.2.1",
"winston-cloudwatch": "^2.0.6"
},
"devDependencies": {
"#types/chai": "^3.4.34",
"#types/currency-formatter": "^1.0.1",
"#types/dot": "^1.1.2",
"#types/elasticsearch": "^5.0.19",
"#types/lodash": "4.14.71",
"#types/moment-timezone": "^0.2.34",
"#types/node": "10.17.39",
"#types/source-map-support": "^0.2.28",
"chokidar": "^2.0.3",
"chokidar-cli": "^1.2.0",
"concurrently": "^3.5.1",
"semver": "^5.3.0",
"serverless": "^1.67.3",
"serverless-webpack": "^5.6.0",
"ts-loader": "^9.2.2",
"tslint": "5.16.0",
"tslint-eslint-rules": "5.4.0",
"typescript": "^3.3.1",
"webpack": "^5.65.0",
"webpack-node-externals": "^3.0.0"
}
}
I'm getting the following error anytime I try to run 'npm run production'. The rest of the error is just a list of 'node_modules' packages where this error also occur.
ERROR in ./resources/assets/sass/app.scss
Module build failed: ModuleBuildError: Module build failed: TypeError: Cannot read property 'unprefixed' of undefined at clearDecl (/Users/prusso/Sites/qut-match-my-skills/node_modules/postcss-unprefix/lib/clearDecl.js:13:30)
I believe the error is in the version of 'autoprefixer' and/or 'postcss-unprefix'. Please check my 'devDependencies' below:
"devDependencies": {
"autoprefixer": "^8.6.3",
"babel-eslint": "^8.2.6",
"babel-polyfill": "^6.26.0",
"browser-sync": "^2.24.5",
"browser-sync-webpack-plugin": "2.0.1",
"cross-env": "^5.2.0",
"cssnano": "^3.10.0",
"eslint": "^4.0.0",
"eslint-plugin-vue": "^4.7.1",
"laravel-mix": "^2.1.11",
"postcss-unprefix": "^2.1.3",
"prettier-eslint": "^8.8.2",
"raw-loader": "^0.5.1"
},
"dependencies": {
"#nextindex/next-scss": "^1.2.1",
"animate-sass": "^0.8.2",
"axios": "^0.18.0",
"babel-core": "^6.26.3",
"es6-promise": "^4.2.4",
"family.scss": "^1.0.8",
"lodash.compact": "^3.0.1",
"lodash.get": "^4.4.2",
"normalize.css": "^8.0.0",
"portal-vue": "^1.3.0",
"smoothscroll-polyfill": "^0.4.3",
"uuid": "^3.3.2",
"vue": "^2.5.16",
"vue-parallaxy": "^1.1.1",
"vue-router": "^3.0.1",
"vuex": "^3.0.1",
"vuex-persistedstate": "^2.5.4",
"zeus-grid": "^8.2.0"
}
Other thing that I have noticed is that if I comment out the following line 'require('postcss-unprefix')' inside 'webpack.mix.js' and run 'npm run production' everything works fine.
mix.options({
postCss: [
// require('postcss-unprefix'),
require('autoprefixer')({
browsers: '>0.1%',
}),
require('cssnano')({
preset: [
'default',
{
discardComments: {
removeAll: true,
},
},
],
}),
],
});
Thanks for your help!!
try autoprefixer:10.2.5 latest version
Trt postcss-rtlcss package insted of postcss-rtl
Latest version (postcss#^8.0.0)
npm install postcss-rtlcss --save-dev
Latest legacy version (postcss#^7.0.0)
npm install postcss-rtlcss#legacy --save-dev
Trying to pin down the source of this error when running jest:
TypeError: (0 , (_jestUtil || _load_jestUtil(...)).validateCLIOptions) is not a function
My directory structure:
root
-test
--spec-files
---*.js
Dev dependencies in my package:
"devDependencies": {
"babel-eslint": "6.1.2",
"babel-jest": "22.1.0",
"chai": "3.5.0",
"chai-as-promised": "5.3.0",
"eslint": "2.13.1",
"eslint-config-airbnb": "6.2.0",
"eslint-plugin-react": "4.3.0",
"jest": "22.1.4",
"jest-cli": "22.1.4",
"jest-runner-eslint": "0.4.0",
"nodemon": "1.12.1",
"nyc": "11.2.1",
"sinon": "2.4.1",
"snyk": "1.69.10",
"spec-xunit-file": "0.0.1-3",
"supertest": "1.2.0",
"supertest-as-promised": "3.2.0",
"xunit-file": "0.0.9"
}
jest.config.js:
module.exports = {
estPathIgnorePatterns: [
'<rootDir>/bower_components/',
'<rootDir>/node_modules/',
'<rootDir>/gulp-tasks/',
],
testMatch: ['<rootDir>/test/spec-files/*.js'],
globalSetup: '<rootDir>/test/setup.js',
};
Running:
./node_modules/.bin/jest --testPathPattern=test/spec-files/.*\\.js$
Ive only noticed one issue opened related to this type of bug: https://github.com/facebook/jest/issues/5740
The cause appears to be having an invalid testPathPattern, however that doesnt seem to be the case for me.
Updating jest and jest-cli to the following fixed the issue:
"jest": "22.4.4",
"jest-cli": "22.4.4",
I updated React-Native from 0.14.0 to 0.16.0 and from now, I have errors at runtime:
Here are the npm dependencies:
"dependencies": {
"async": "^1.5.0",
"immutable": "^3.7.6",
"react-native": "^0.16.0",
"react-native-contacts": "../../react-native-contacts",
"react-native-contacts-rx": "^1.0.1",
"react-native-gifted-messenger": "0.0.7",
"react-native-i18n": "0.0.6",
"react-redux": "^4.0.1",
"redux": "^3.0.5",
"rx": "^4.0.7"
},
"devDependencies": {
"babel-eslint": "^5.0.0-beta6",
"eslint": "^1.10.3",
"eslint-config-airbnb": "^2.1.1",
"eslint-plugin-react": "^3.11.3",
"events": "^1.1.0",
"flux": "^2.1.1",
"keymirror": "^0.1.1",
"lodash": "^3.10.1",
"redux-devtools": "^3.0.0"
}
And my .babelrc file:
{
"retainLines": true,
"compact": true,
"comments": false,
}
Any suggestions?
The Questions was answered in an issue #Jean Lebrument submitted. Positing answer here for stumblers like myself...
https://github.com/facebook/react-native/issues/4844
The problem is most likely in your .babelrc file. If you experience this problem, compare your .babelrc file to react natives default one. Try removing the file or building off of default one, adding the features that you need.
Make sure to restart your packager, stop, and re-run your project.
I had this exact same problem you can check out what I did here - https://stackoverflow.com/a/53069785/2884655
But in short I just imported the babel-plugin-transform-async-to-generator module into my project and added it into my babelrc file