I recently integrated "babel-plugin-istanbul": "^6.1.1" in my application and created babel.config.js file. Before I was using
"presets": [
"env"
]
},
in my package.json and then moved it to babel.config file.
The grunt version that I was using is "grunt-babel": "^6.0.0".
With this grunt-babel version, I get this error
Warning: Task "ngAnnotate" failed. Use --force to continue.
Aborted due to warnings.
When I change grunt-babel version to 8.0.0, the above error goes away but I see this error in my application console:
RangeError: Maximum call stack size exceeded
Babel.config:
const presets = ['env'];
const plugins = [];
if (process.env.ISTANBUL === 'true') {
plugins.push([
'istanbul',
{
include: ['src/**'],
exclude: ['dist/']
}
]);
}
module.exports = {
presets,
plugins
};
package.json file:
"babel-preset-env": "^1.7.0",
"githook-scripts": "^1.1.0",
"grunt": "^1.5.3",
"grunt-angular-templates": "^1.2.0",
"grunt-autoprefixer": "^3.0.4",
"grunt-babel": "^8.0.0",
"grunt-cli": "^1.2.0",
"grunt-concurrent": "^1.0.0",
"grunt-contrib-clean": "^2.0.1",
"grunt-contrib-concat": "^0.5.0",
"grunt-contrib-connect": "^3.0.0",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-cssmin": "^4.0.0",
"grunt-contrib-htmlmin": "^3.1.0",
"grunt-contrib-jshint": "^3.2.0",
"grunt-contrib-less": "^3.0.0",
"grunt-contrib-uglify": "^5.2.1",
"grunt-contrib-watch": "^1.1.0",
"grunt-filerev": "^2.1.2",
"grunt-karma": "^4.0.2",
"grunt-newer": "^1.1.0",
"grunt-postcss": "^0.9.0",
"grunt-svgmin": "^6.0.1",
"grunt-usemin": "^3.0.0",
"babel-plugin-istanbul": "^6.1.1",
"grunt-ng-annotate": "^4.0.0"
Can someone please help?
Related
EDIT: This question is related to #56558281 however it's two years old and hasn't been answered
I'm refactoring a few apps we have and tried moving a block of JS code from one NestJs app into another Nuxt app. After installing the dependencies I get this error:
These dependencies were not found: friendly-errors 11:04:41
friendly-errors 11:04:41
* child_process in ./node_modules/google-auth-library/build/src/auth/googleauth.js friendly-errors 11:04:41
* fs in ./node_modules/google-auth-library/build/src/auth/googleauth.js, ./node_modules/google-p12-pem/build/src/index.js and 4 others
friendly-errors 11:04:41
To install them, you can run: npm install --save child_process fs
I tried running npm install --save child_process fs without luck
Tried deleting node modules and clearing the cache then reinstalling with no luck
and I tried adding this block as per this answer without luck either
"browser":{
"child_process": false
}
Package.json
...
"dependencies": {
"#nuxt/types": "^2.14.5",
"#nuxtjs/apollo": "^4.0.1-rc.5",
"#nuxtjs/axios": "^5.12.5",
"#nuxtjs/gtm": "^2.2.2",
"#nuxtjs/vuetify": "^1.11.0",
"apollo-link-http": "^1.5.17",
"child_process": "^1.0.2",
"filestack-js": "^3.16.0",
"googleapis": "^39.2.0",
"google-auth-library": "^3.1.2",
"graphql": "^15.5.1",
"graphql-tag": "^2.12.5",
"isomorphic-fetch": "^3.0.0",
"net": "^1.0.2",
"nuxt": "^2.0.0",
"nuxt-i18n": "^6.12.2",
"nuxt-webfontloader": "^1.1.0",
"pluralize": "^8.0.0",
"readline": "^1.3.0",
"tls": "^0.0.1",
"typescript": "^3.0.0",
"url-slug": "^2.2.0",
"vue": "^2.6.11",
"vue-apollo": "^3.0.7",
"vue-infinite-loading": "^2.4.5",
"vuedraggable": "^2.24.3"
},
"devDependencies": {
"#mdi/font": "^5.3.45",
"#nuxt/typescript-build": "^2.0.3",
"#nuxtjs/eslint-config-typescript": "^3.0.0",
"#nuxtjs/eslint-module": "^2.0.0",
"#types/pluralize": "0.0.29",
"#vue/test-utils": "^1.0.0-beta.27",
"babel-eslint": "^10.0.1",
"babel-jest": "^26.0.1",
"deepmerge": "^4.2.2",
"eslint": "^7.9.0",
"eslint-plugin-nuxt": ">=0.4.2",
"eslint-plugin-prettier": "^3.0.1",
"fibers": "^5.0.0",
"jest": "^26.0.1",
"pug": "^2.0.3",
"pug-plain-loader": "^1.0.0",
"sass": "^1.26.11",
"sass-loader": "^8.0.2",
"typed-graphqlify": "^2.2.3",
"vue-class-component": "^7.1.0",
"vue-jest": "^4.0.0-beta.3",
"vue-property-decorator": "^9.0.0"
},
"browser":{
"child_process": false
}
i try to run my react native app to ios but i got this error, while in android the app work just fine, do someone know about this ?
xcode 11.5,
rn 0.61.5,
using react native cli
i already search on several site but dont seem find any solution, here the screen shoot :
"dependencies": {
"#microsoft/signalr": "^3.1.3",
"#react-native-community/async-storage": "^1.7.1",
"#react-native-community/datetimepicker": "^2.2.1",
"#react-native-community/masked-view": "0.1.5",
"#react-native-community/picker": "^1.6.1",
"#react-native-community/viewpager": "3.3.0",
"#sentry/react-native": "^1.4.1",
"axios": "^0.19.1",
"color": "^3.1.2",
"ellipsize": "^0.1.0",
"form-data": "^3.0.0",
"google-translate": "^3.0.0",
"i18n-js": "^3.5.1",
"intl": "^1.2.5",
"moment": "^2.24.0",
"moment-range": "^4.0.2",
"numeral": "^2.0.6",
"opentok-react-native": "^0.12.2",
"react": "16.9.0",
"react-cookies": "^0.1.1",
"react-native": "0.61.5",
"react-native-amazing-cropper": "^0.1.1",
"react-native-biometrics": "^2.1.4",
"react-native-camera": "^3.17.0",
"react-native-collapsible": "^1.5.1",
"react-native-daterange-picker": "^1.1.3",
"react-native-device-info": "^5.5.3",
"react-native-file-picker": "0.0.19",
"react-native-geocoder": "^0.5.0",
"react-native-gesture-handler": "^1.5.3",
"react-native-image-crop-tools": "^1.3.4",
"react-native-image-picker": "^2.3.0",
"react-native-localize": "^1.4.0",
"react-native-location": "^2.5.0",
"react-native-masked-text": "^1.13.0",
"react-native-onesignal": "^3.6.3",
"react-native-overlay-section": "0.1.13",
"react-native-paper": "3.4.0",
"react-native-reanimated": "^1.4.0",
"react-native-responsive-screen": "1.4.0",
"react-native-safe-area-context": "0.6.2",
"react-native-screens": "2.0.0-alpha.22",
"react-native-vector-icons": "^6.6.0",
"react-native-webview": "8.1.1",
"react-navigation": "^4.0.10",
"react-navigation-stack": "^2.0.4",
"react-navigation-tabs": "^2.7.0",
"react-redux": "^7.1.3",
"reanimated-bottom-sheet": "1.0.0-alpha.18",
"redux": "^4.0.5",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.3.0",
"sendbird": "3.0.117",
"styled-components": "^4.4.1",
"throttle-debounce": "^2.1.0",
"validator": "^12.1.0"
},
The error is coming from the react-native-gesture-handler package.
Did you import it in your code ? If yes, try to remove the import and do a rm -rf node_modules && npm install.
If this doesn't work, try to update it (Latest version at the moment is ^1.6.1) in your package.json.
sorry just found the problem, in my app there are custom native library that use scroll view in folder src, that causing register view two times.
After updating all my outdated npm packages to #latest, my electron app fails to start, giving the error
ERROR in ./src/index.js
[0] Module build failed (from ./node_modules/babel-loader/lib/index.js):
[0] Error: Plugin/Preset files are not allowed to export objects, only functions. In /Users/nyxynyx/foobar/node_modules/babel-preset-stage-0/lib/index.js
Any idea what went wrong? Thank you everyone!
.babelrc
{
"presets": ["env", "stage-0", "react"],
"plugins": [
"babel-plugin-styled-components",
"react-hot-loader/babel",
["transform-class-properties", { "loose": true }]
]
}
package.json (dependencies & devDependencies)
"dependencies": {
"#fortawesome/fontawesome-svg-core": "^1.2.21",
"#fortawesome/free-solid-svg-icons": "^5.10.1",
"#fortawesome/react-fontawesome": "^0.1.4",
"babel-core": "^6.26.3",
"babel-eslint": "^10.0.2",
"babel-loader": "^8.0.6",
"babel-plugin-styled-components": "^1.10.6",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"babel-register": "^6.26.0",
"bootstrap": "^4.3.1",
"css-loader": "^3.2.0",
"electron-log": "^3.0.7",
"electron-updater": "^4.1.2",
"file-loader": "^4.2.0",
"firebase": "^6.3.4",
"fix-path": "^2.1.0",
"json-loader": "^0.5.7",
"lodash": "^4.17.15",
"menubar": "^6.0.7",
"prop-types": "^15.7.2",
"react": "^16.8.6",
"react-redux": "^7.1.0",
"react-redux-firebase": "^2.3.0",
"reactstrap": "^8.0.1",
"redux": "^4.0.4",
"redux-thunk": "^2.3.0",
"style-loader": "^1.0.0",
"styled-components": "^4.3.2",
"typeface-open-sans": "0.0.75",
"url-loader": "^2.1.0"
},
"devDependencies": {
"concurrently": "^4.1.1",
"devtron": "^1.4.0",
"electron": "^6.0.1",
"electron-builder": "^21.2.0",
"electron-debug": "^3.0.1",
"electron-devtools-installer": "^2.2.4",
"eslint": "^6.1.0",
"eslint-config-airbnb": "^17.1.1",
"eslint-import-resolver-webpack": "^0.11.1",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.14.3",
"express": "^4.17.1",
"react-dom": "^16.8.6",
"react-hot-loader": "^4.12.10",
"react-router": "^5.0.1",
"react-router-dom": "^5.0.1",
"stylelint": "^10.1.0",
"stylelint-config-standard": "^18.3.0",
"uglifyjs-webpack-plugin": "^2.2.0",
"webpack": "^4.39.1",
"webpack-dev-middleware": "^3.7.0",
"webpack-hot-middleware": "^2.25.0",
"webpack-merge": "^4.2.1"
},
Using node v12.6.0 on Mac OS X Mojave 10.14.5
I am moving my answer from comment due to lack of space there :)
Try using new packages for babel-core, babel-register and presets, replacing the old ones since they are depricated (babel-core, babel-presets-env, etc):
#babel/core - https://www.npmjs.com/package/#babel/core,
#babel/presets-env - https://babeljs.io/docs/en/babel-preset-env,
#babel/presets-react - https://babeljs.io/docs/en/babel-preset-react,
#babel/presets-stage-0 https://babeljs.io/docs/en/babel-preset-stage-0,
#babel/polyfill - https://babeljs.io/docs/en/babel-polyfill and
#babel/register - https://babeljs.io/docs/en/babel-register.
Then try deleting package.lock, and running again npm i . If that is not helping you can also try deleting node_modules folder, and running npm i again
babel-preset-env / babel-preset-react packages are deprecated.
use #babel/preset-env and #babel/preset-react packages.
And do the following change in .babelrc :
"presets": ["#babel/env", "#babel/react"]
That is due to outdated babel packages being used. The babel project, just like most other active Javascript projects, have moved on to using scope packages. Hence, the package names starts with #babel
Check this to fix issue
I'm building an application with Electron and Sequelize. I started to configure my database, then, I've received this error:
Uncaught Error: Please install sqlite3 package manually
at new ConnectionManager (/home/matheusdrdj/Documentos/Git/personal-
management/node_modules/sequelize/lib/dialects/sqlite/con…:31)
at new SqliteDialect (/home/matheusdrdj/Documentos/Git/personal-
management/node_modules/sequelize/lib/dialects/sqlite/ind…:14)
at new Sequelize (/home/matheusdrdj/Documentos/Git/personal-
management/node_modules/sequelize/lib/sequelize.js:239)
at eval (index.js?17a5:3)
at Object. (renderer.js:1084)
at webpack_require (renderer.js:680)
at fn (renderer.js:90)
at eval (index.js?21f1:1)
at Object. (renderer.js:1077)
at webpack_require (renderer.js:680)
at fn (renderer.js:90)
at eval (main.js?3b76:1)
at Object. (renderer.js:918)
at webpack_require (renderer.js:680)
at fn (renderer.js:90)
at Object. (renderer.js:835)
at webpack_require (renderer.js:680)
at renderer.js:726
at renderer.js:729
I have installed sqlite3 globally and localy, tested it on the console and it's working fine. But, my application doesn't even load the screen.
My dependencies:
"dependencies": {
"axios": "^0.16.1",
"sequelize": "^4.37.7",
"sqlite3": "^4.0.0",
"vue": "^2.4.2",
"vue-electron": "^1.0.6",
"vue-router": "^2.5.3",
"vuetify": "1.0.0",
"vuex": "^2.3.1"
},
"devDependencies": {
"babel-core": "^6.25.0",
"babel-loader": "^7.1.1",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.0",
"babel-preset-stage-0": "^6.24.1",
"babel-register": "^6.24.1",
"babili-webpack-plugin": "0.1.2",
"cfonts": "^1.1.3",
"chalk": "^2.1.0",
"copy-webpack-plugin": "^4.0.1",
"cross-env": "^5.0.5",
"css-loader": "^0.28.4",
"del": "^3.0.0",
"devtron": "^1.4.0",
"electron": "^1.7.5",
"electron-builder": "^19.19.1",
"electron-debug": "^1.4.0",
"electron-devtools-installer": "^2.2.0",
"electron-rebuild": "^1.7.3",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^0.11.2",
"html-webpack-plugin": "^2.30.1",
"js-sha256": "^0.9.0",
"multispinner": "^0.2.1",
"node-loader": "^0.6.0",
"style-loader": "^0.18.2",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.1",
"url-loader": "^0.5.9",
"vue-html-loader": "^1.2.4",
"vue-loader": "^13.0.5",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.4.2",
"webpack": "^3.5.2",
"webpack-dev-server": "^2.7.1",
"webpack-hot-middleware": "^2.18.2"
}
I cannot figure out what is happening.
With Electron sqlite3 has to be built with electron-builder.
How to use sqlite3 module with electron?
and https://github.com/electron-userland/electron-builder
both recommend adding this to your package.json
"postinstall": "electron-builder install-app-deps"
This will rebuild all native binaries everytime you install a new package.
After installing the sails-auth and sails-permissions package my autoreload hook (https://github.com/sgress454/sails-hook-autoreload) doesn't work anymore:
error: Failed to reload ORM hook. Details: Error: Failed to reinitialize ORM because the initialize() method of the ORM hook returned an error.
Details:
Error: Consistency violation: Instantiated Waterline model already has a datastore property.
Packages:
"bcryptjs": "^2.3.0",
"ejs": "2.3.4",
"grunt": "0.4.5",
"grunt-contrib-clean": "0.6.0",
"grunt-contrib-coffee": "0.13.0",
"grunt-contrib-concat": "0.5.1",
"grunt-contrib-copy": "0.5.0",
"grunt-contrib-cssmin": "0.9.0",
"grunt-contrib-jst": "0.6.0",
"grunt-contrib-less": "1.1.0",
"grunt-contrib-sass": "^1.0.0",
"grunt-contrib-uglify": "0.7.0",
"grunt-contrib-watch": "0.5.3",
"grunt-sails-linker": "~0.10.1",
"grunt-sync": "0.2.4",
"include-all": "~0.1.6",
"marlinspike": "^1.0.0",
"passport": "^0.3.2",
"passport-local": "^1.0.0",
"rc": "1.0.1",
"sails": "~0.12.3",
"sails-auth": "^2.1.3",
"sails-disk": "~0.10.9",
"sails-hook-autoreload": "^0.13.1",
"sails-permissions": "^2.2.0",
"validator": "^5.2.0"
Sails version v0.12.3.
Any ideas how to fix this?