i have the following error when run this npm run compile:js i get this error:
> sfra#6.0.0 compile:scss
> sgmf-scripts --compile css
C:\Users\Administrator\Desktop\NewTry\trainingb2c\node_modules\webpack\lib\ChunkGraph.js:1679
throw new Error(
^
Error: Chunk.getNumberOfModulesThere was no ChunkGraph assigned to the Chunk for backward-compat (Use the new API)
at deprecated (node:internal/util:89:15)
at Function.getChunkGraphForChunk (C:\Users\Administrator\Desktop\NewTry\trainingb2c\node_modules\webpack\lib\ChunkGraph.js:1689:10)
at Chunk.getNumberOfModules (C:\Users\Administrator\Desktop\NewTry\trainingb2c\node_modules\webpack\lib\Chunk.js:170:21)
at ExtractTextPlugin.<anonymous> (C:\Users\Administrator\Desktop\NewTry\trainingb2c\node_modules\extract-text-webpack-plugin\dist\index.js:302:30)
at Array.forEach (<anonymous>)
at C:\Users\Administrator\Desktop\NewTry\trainingb2c\node_modules\extract-text-webpack-plugin\dist\index.js:301:25
at AsyncSeriesHook.eval [as callAsync] (eval at create (C:\Users\Administrator\Desktop\NewTry\trainingb2c\node_modules\sgmf-scripts\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:7:1)
at AsyncSeriesHook.lazyCompileHook (C:\Users\Administrator\Desktop\NewTry\trainingb2c\node_modules\sgmf-scripts\node_modules\tapable\lib\Hook.js:154:20)
at C:\Users\Administrator\Desktop\NewTry\trainingb2c\node_modules\sgmf-scripts\node_modules\webpack\lib\Compilation.js:1405:32
this is my webpack.config.js:
webpack.config.js
Some idea to solve? thanks in advance
Related
I am working on an Express based backend API with Firebase. I have some issues with Firebase configuration.
When I try to require firebase I get the following error.
const firebase = require('firebase');
node:internal/modules/cjs/loader:499
throw e;
^
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in /home/***/Desktop/Express/DemoBackend/node_modules/firebase/package.json
at new NodeError (node:internal/errors:387:5)
at throwExportsNotFound (node:internal/modules/esm/resolve:439:9)
at packageExportsResolve (node:internal/modules/esm/resolve:718:3)
at resolveExports (node:internal/modules/cjs/loader:493:36)
at Module._findPath (node:internal/modules/cjs/loader:533:31)
at Module._resolveFilename (node:internal/modules/cjs/loader:942:27)
at Module._load (node:internal/modules/cjs/loader:804:27)
at Module.require (node:internal/modules/cjs/loader:1022:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/home/***/Desktop/Express/DemoBackend/firebase_config.js:1:18)
{
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
I am working with NodeJS 18.6.0
Thanks for your help!
I am getting below error when trying to use a locally-linked blueprint. The command I run is also below. Please advise.
Environment:
node --version -> v14.17.0
npm --version -> 6.14.13
jhipster --version -> 7.0.1
yo --version -> 3.1.1
Command I run:
jhipster import-jdl apps.jh --blueprints cassandra-blueprint
Error I get from above command:
ERROR! jhContext.setupServerOptions is not a function
TypeError: jhContext.setupServerOptions is not a function
at new module.exports (/Users/amarppatel/workspace/saathratri-app-holder/jhipster-cassandra-blueprint/generators/common/index.js:20:19)
at Environment.instantiate (/usr/local/lib/node_modules/generator-jhipster/node_modules/yeoman-environment/lib/environment.js:748:23)
at Environment.create (/usr/local/lib/node_modules/generator-jhipster/node_modules/yeoman-environment/lib/environment.js:720:17)
at JHipsterCommonGenerator.composeWith (/usr/local/lib/node_modules/generator-jhipster/node_modules/yeoman-generator/lib/index.js:1182:42)
at JHipsterCommonGenerator._composeBlueprint (/usr/local/lib/node_modules/generator-jhipster/generators/generator-base-blueprint.js:348:37)
at /usr/local/lib/node_modules/generator-jhipster/generators/generator-base-blueprint.js:248:41
at Array.forEach (<anonymous>)
at JHipsterCommonGenerator.instantiateBlueprints (/usr/local/lib/node_modules/generator-jhipster/generators/generator-base-blueprint.js:247:18)
at new JHipsterCommonGenerator (/usr/local/lib/node_modules/generator-jhipster/generators/common/index.js:41:49)
at Environment.instantiate (/usr/local/lib/node_modules/generator-jhipster/node_modules/yeoman-environment/lib/environment.js:748:23)
ERROR! jhContext.setupServerOptions is not a function
TypeError: jhContext.setupServerOptions is not a function
at new module.exports (/Users/amarppatel/workspace/saathratri-app-holder/jhipster-cassandra-blueprint/generators/common/index.js:20:19)
at Environment.instantiate (/usr/local/lib/node_modules/generator-jhipster/node_modules/yeoman-environment/lib/environment.js:748:23)
at Environment.create (/usr/local/lib/node_modules/generator-jhipster/node_modules/yeoman-environment/lib/environment.js:720:17)
at JHipsterCommonGenerator.composeWith (/usr/local/lib/node_modules/generator-jhipster/node_modules/yeoman-generator/lib/index.js:1182:42)
at JHipsterCommonGenerator._composeBlueprint (/usr/local/lib/node_modules/generator-jhipster/generators/generator-base-blueprint.js:348:37)
at /usr/local/lib/node_modules/generator-jhipster/generators/generator-base-blueprint.js:248:41
at Array.forEach (<anonymous>)
at JHipsterCommonGenerator.instantiateBlueprints (/usr/local/lib/node_modules/generator-jhipster/generators/generator-base-blueprint.js:247:18)
at new JHipsterCommonGenerator (/usr/local/lib/node_modules/generator-jhipster/generators/common/index.js:41:49)
at Environment.instantiate (/usr/local/lib/node_modules/generator-jhipster/node_modules/yeoman-environment/lib/environment.js:748:23)
INFO! Generator app child process exited with code 1
ERROR! Error executing app --reproducible --no-force --with-entities --no-dry-run --no-whitespace --no-bail --no-skip-regenerate --no-skip-yo-resolve --from-jdl --blueprints cassandra-blueprint --no-skip-cache --no-skip-install --no-force-install --no-ask-answered --no-defaults --no-skip-git
Error: Error executing app --reproducible --no-force --with-entities --no-dry-run --no-whitespace --no-bail --no-skip-regenerate --no-skip-yo-resolve --from-jdl --blueprints cassandra-blueprint --no-skip-cache --no-skip-install --no-force-install --no-ask-answered --no-defaults --no-skip-git
at ChildProcess.<anonymous> (/usr/local/lib/node_modules/generator-jhipster/cli/import-jdl.js:183:16)
at ChildProcess.emit (events.js:376:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
ERROR! jhContext.setupServerOptions is not a function
INFO! Generator app child process exited with code 1
TypeError: jhContext.setupServerOptions is not a function
at new module.exports (/Users/amarppatel/workspace/saathratri-app-holder/jhipster-cassandra-blueprint/generators/common/index.js:20:19)
at Environment.instantiate (/usr/local/lib/node_modules/generator-jhipster/node_modules/yeoman-environment/lib/environment.js:748:23)
at Environment.create (/usr/local/lib/node_modules/generator-jhipster/node_modules/yeoman-environment/lib/environment.js:720:17)
at JHipsterCommonGenerator.composeWith (/usr/local/lib/node_modules/generator-jhipster/node_modules/yeoman-generator/lib/index.js:1182:42)
at JHipsterCommonGenerator._composeBlueprint (/usr/local/lib/node_modules/generator-jhipster/generators/generator-base-blueprint.js:348:37)
at /usr/local/lib/node_modules/generator-jhipster/generators/generator-base-blueprint.js:248:41
at Array.forEach (<anonymous>)
at JHipsterCommonGenerator.instantiateBlueprints (/usr/local/lib/node_modules/generator-jhipster/generators/generator-base-blueprint.js:247:18)
at new JHipsterCommonGenerator (/usr/local/lib/node_modules/generator-jhipster/generators/common/index.js:41:49)
at Environment.instantiate (/usr/local/lib/node_modules/generator-jhipster/node_modules/yeoman-environment/lib/environment.js:748:23)
INFO! Generator app child process exited with code 1
I am using Vue CLI version 3 to run a Vue application inside a Docker container. To start the development server, I run:
https://cli.vuejs.org/guide/cli-service.html
This gives the following error:
ERROR Failed to compile with 1 errors 17:05:14
error in ./app/main.js
Module build failed (from ./node_modules/#vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js):
Error: .plugins[0] may only be a two-tuple or three-tuple
at assertPluginItem (/home/src/node_modules/#babel/core/lib/config/validation/option-assertions.js:235:13)
at arr.forEach (/home/src/node_modules/#babel/core/lib/config/validation/option-assertions.js:222:30)
at Array.forEach (<anonymous>)
at assertPluginList (/home/src/node_modules/#babel/core/lib/config/validation/option-assertions.js:222:9)
at Object.keys.forEach.key (/home/src/node_modules/#babel/core/lib/config/validation/options.js:107:5)
at Array.forEach (<anonymous>)
at validateNested (/home/src/node_modules/#babel/core/lib/config/validation/options.js:83:21)
at validate (/home/src/node_modules/#babel/core/lib/config/validation/options.js:74:10)
at file (/home/src/node_modules/#babel/core/lib/config/config-chain.js:174:34)
at cachedFunction (/home/src/node_modules/#babel/core/lib/config/caching.js:33:19)
at buildRootChain (/home/src/node_modules/#babel/core/lib/config/config-chain.js:120:36)
at loadPrivatePartialConfig (/home/src/node_modules/#babel/core/lib/config/partial.js:85:55)
at Object.loadPartialConfig (/home/src/node_modules/#babel/core/lib/config/partial.js:110:18)
at Object.<anonymous> (/home/src/node_modules/#vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js:140:26)
at Generator.next (<anonymous>)
at asyncGeneratorStep (/home/src/node_modules/#vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js:3:103)
# multi (webpack)-dev-server/client/index.js ./node_modules/#vue/cli-service/node_modules/webpack/hot/dev-server.js ./app/main.js
I suspect that the offending code is the following, in my .babelrc file:
"plugins": [
["transform-runtime", "transform-vue-jsx", "transform-regenerator", {
"polyfill": false,
"regenerator": true
}]
Could someone suggest how I could go about resolving this? Thanks!
Your [ is in the wrong place. It should be
"plugins": [
"transform-runtime",
"transform-vue-jsx",
["transform-regenerator", {
"polyfill": false,
"regenerator": true
}]
]
When releasing a CodePush release, I am running into this issue.
$ appcenter codepush release-react \
--deployment-name=Staging \
--token=$APPCENTER_ACCESS_TOKEN \
--description "$(git show -q)" \
--disable-duplicate-release-error \
--app=$APP_NAME
| Getting app info.../ Getting app info...- Getting app info...\ Getting app info...| Getting app info...Detecting android app version:
Using the target binary version value "0.0.1" from "android/app/build.gradle".
Running "react-native bundle" command:
node node_modules/react-native/local-cli/cli.js bundle --assets-dest /tmp/code-push11899-237-hv244s.pd3u/CodePush --bundle-output /tmp/code-push11899-237-hv244s.pd3u/CodePush/index.android.bundle --dev false --entry-file index.js --platform android
Cannot assign to read only property 'undefined' of object '#<Object>'
TypeError: Cannot assign to read only property 'undefined' of object '#<Object>'
at buildBundle$ (/home/circleci/repo/node_modules/react-native/local-cli/bundle/buildBundle.js:39:10)
at tryCatch (/home/circleci/repo/node_modules/regenerator-runtime/runtime.js:62:40)
at Generator.invoke [as _invoke] (/home/circleci/repo/node_modules/regenerator-runtime/runtime.js:288:22)
at Generator.prototype.(anonymous function) [as next] (/home/circleci/repo/node_modules/regenerator-runtime/runtime.js:114:21)
at tryCatch (/home/circleci/repo/node_modules/regenerator-runtime/runtime.js:62:40)
at invoke (/home/circleci/repo/node_modules/regenerator-runtime/runtime.js:152:20)
at /home/circleci/repo/node_modules/regenerator-runtime/runtime.js:187:11
at new Promise (<anonymous>)
at callInvokeWithMethodAndArg (/home/circleci/repo/node_modules/regenerator-runtime/runtime.js:186:16)
at AsyncIterator.enqueue [as _invoke] (/home/circleci/repo/node_modules/regenerator-runtime/runtime.js:209:13)
Error: Failed to release a CodePush update.
Exited with code 3
I have explored a bit, but the mentioned line seems to point to https://github.com/facebook/react-native/blob/master/local-cli/bundle/buildBundle.js#L39 which is a simple NODE_ENV overwrite:
process.env.NODE_ENV = args.dev ? 'development' : 'production';
Do you have any idea where that issue is coming from?
Here is more information:
node:8.10
yarn install v1.5.1
appcenter-cli#1.1.4
"react-native": "0.57.1",
"react-native-code-push": "^5.4.0",
Update
I have narrowed it down to the following command failing:
./node_modules/.bin/react-native bundle --platform android --dev false --reset-cache --entry-file index.js --bundle-output ./android/app/build/generated/assets/react/release/index.android.bundle --assets-dest ./android/app/build/generated/res/react/release
Cannot assign to read only property 'undefined' of object '#<Object>'
TypeError: Cannot assign to read only property 'undefined' of object '#<Object>'
at buildBundle$ (/Users/chanto/Apps/mobile-app/node_modules/react-native/local-cli/bundle/buildBundle.js:39:10)
at tryCatch (/Users/chanto/Apps/mobile-app/node_modules/regenerator-runtime/runtime.js:62:40)
at Generator.invoke [as _invoke] (/Users/chanto/Apps/mobile-app/node_modules/regenerator-runtime/runtime.js:288:22)
at Generator.prototype.(anonymous function) [as next] (/Users/chanto/Apps/mobile-app/node_modules/regenerator-runtime/runtime.js:114:21)
at tryCatch (/Users/chanto/Apps/mobile-app/node_modules/regenerator-runtime/runtime.js:62:40)
at invoke (/Users/chanto/Apps/mobile-app/node_modules/regenerator-runtime/runtime.js:152:20)
at /Users/chanto/Apps/mobile-app/node_modules/regenerator-runtime/runtime.js:187:11
at new Promise (<anonymous>)
at callInvokeWithMethodAndArg (/Users/chanto/Apps/mobile-app/node_modules/regenerator-runtime/runtime.js:186:16)
at AsyncIterator.enqueue [as _invoke] (/Users/chanto/Apps/mobile-app/node_modules/regenerator-runtime/runtime.js:209:13)
Upgrading to react-native 0.57.2 solved my issue.
#wonderfulbump
I am trying to delete a file in nodejs. When I run the following code:
try {
fs.unlinkSync('file');
} catch(e) {
console.log(e)
}
I get the following error.
Error: EBUSY: resource busy or locked, unlink '<redacted>'
at Object.fs.unlinkSync (fs.js:1067:18)
at Function.rimrafSync [as sync] (<redacted>\node_modules\rimraf\rimraf.js:306:17)
at <redacted>:74:10
at Array.forEach (<anonymous>)
at Function.module.exports.sync (<redacted>\node_modules\node-delete\index.js:67:30)
at <filepath>:4145:46
at Array.forEach (<anonymous>)
at <redacted>:4142:21
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
errno: -4082,
code: 'EBUSY',
syscall: 'unlink',
path: '<redacted>'
This error means the file you're trying to delete is currently in use or locked.
Without providing more informations we will guess, that the file you are trying to delete is locked by another program. Please check this...