I install jhipster project but when I run command yarn start it showing following error:
F:\projectname\node_modules\enhanced-resolve\lib\Resolver.js:48 resolveStep: withName("resolveStep", new SyncHook(["hook", "request"])),
^
TypeError: SyncHook is not a constructor
at new Resolver (F:\projectname\node_modules\enhanced-resolve\lib\Resolver.js:48:41)
at Object.exports.createResolver (F:\projectname\node_modules\enhanced-resolve\lib\ResolverFactory.js:107:14)
at Object.<anonymous> (F:\projectname\node_modules\enhanced-resolve\lib\node.js:20:39)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Related
I'm working on an application where I'd like to cache the contents of the node_modules folder on subsequent yarn install commands. Everything in the caching logic is working fine, however, I get an error when using the cached directory saying
$ react-scripts build
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module '../scripts/build'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.resolve (internal/modules/cjs/helpers.js:33:19)
at Object.<anonymous> (/local/frontend/node_modules/.bin/react-scripts:31:23)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Is this because the react-scripts binary isn't around on the second build? And if so, does the container that runs this have to have react-scripts on it ahead of time?
I am running the fabcar fabric-sample, in fabcar folder i run ./startFabric.sh that worked fine and network launched from start to end. but after that when i running node enrollAdmin.js in javascript folder it shows the following error!!! My OS is ubuntu 18.4
I tried different solutions given on internet like npm install etc but non of them worked.
node enrollAdmin.js error logs
module.js:549
throw err;
^
Error: Cannot find module 'fabric-network'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/local/hyperledger/fabric-samples/fabcar/javascript/enrollAdmin.js:8:47)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
I am creating the plugin in Shopware 6.So i have installed "development-template" reference from this question
Shopware 6 Command './psh.phar administration:build.' is not working
After following all the steps for installation when i opened front-end it is broken , where as back-end is working fine.
broken front-end(image)
I have found that "./psh.phar storefront:build" command is not working.It causes node.js error shown as below
/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/build/utils.js:116
} catch {
^
SyntaxError: Unexpected token {
at NativeCompileCache._moduleCompile (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
at Module._compile (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/v8-compile-cache/v8-compile-cache.js:186:36)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at Object.<anonymous> (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/build/webpack.base.config.js:6:15)
at Module._compile (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at Object.<anonymous> (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/webpack.config.js:23:5)
at Module._compile (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at WEBPACK_OPTIONS (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/webpack-cli/bin/utils/convert-argv.js:116:13)
at requireConfig (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/webpack-cli/bin/utils/convert-argv.js:118:6)
at /var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/webpack-cli/bin/utils/convert-argv.js:125:17
at Array.forEach (<anonymous>)
at module.exports (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/webpack-cli/bin/utils/convert-argv.js:123:15)
at yargs.parse (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/webpack-cli/bin/cli.js:71:45)
at Object.parse (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/webpack-cli/node_modules/yargs/yargs.js:567:18)
at /var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/webpack-cli/bin/cli.js:49:8
at Object.<anonymous> (/var/www/html/shopware6/vendor/shopware/platform/src/Storefront/Resources/node_modules/webpack-cli/bin/cli.js:365:3)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sw-next-storefront#1.0.0 production: `NODE_ENV=production webpack --config webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sw-next-storefront#1.0.0 production script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/rahul/.npm/_logs/2019-09-24T09_05_58_383Z-debug.log
Execution aborted, a subcommand failed!
i think solving this can fix front-end broken error.
After updating node and npm to latest version, its working now.I think the error was with nodejs.
When Im compiling my .less file, I need to run node skeleton build in terminal, but instead of compiling, this error occur:
Building target: default
=============== ERROR ===============
{ Error: Cannot find module 'extend'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15)
at Function.Module._load (internal/modules/cjs/loader.js:520:25)
at Module.require (internal/modules/cjs/loader.js:650:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (/opt/lampp/htdocs/htlgi_london/lib/build/getSettings.js:3:14)
at Module._compile (internal/modules/cjs/loader.js:702:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
at Module.load (internal/modules/cjs/loader.js:612:32)
at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
at Function.Module._load (internal/modules/cjs/loader.js:543:3) code: 'MODULE_NOT_FOUND' }
Please show me how to solve this problem.
I installed Node.JS 64x version 8.10.0 in windows 10. And everytime I use npm command in "cmd" always got this error. I tried this solution but still has the same error, topic: "error cannot find module 'umask'". Does anyone has a clue? Thank you very much.
C:\WINDOWS\system32>npm --version
module.js:549
throw err;
^
Error: Cannot find module 'umask'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\ProgramData\Microsoft\VisualStudio\MDA\3702e81b\taco-toolset-6.3.1\node_modules\npm\lib\utils\umask.js:1:75)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)