I'm using below url to start bootstrap 4 with gulp:
https://coursetro.com/posts/design/72/Installing-Bootstrap-4-Tutorial
But I got below Error when i run gulp command.
ReferenceError: primordials is not defined
at fs.js:39:5
at req_ (X:\Users\pradeep.patel\Desktop\PP\Website\PP\node_modules\natives\index.js:143:24)
at Object.req [as require] (X:\Users\pradeep.patel\Desktop\PP\Website\PP\node_modules\natives\index.js:55:10)
at Object. (X:\Users\pradeep.patel\Desktop\PP\Website\PP\node_modules\graceful-fs\fs.js:1:37)
at Module._compile (internal/modules/cjs/loader.js:1185:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1205:10)
at Module.load (internal/modules/cjs/loader.js:1034:32)
at Function.Module._load (internal/modules/cjs/loader.js:923:14)
at Module.require (internal/modules/cjs/loader.js:1074:19)
at require (internal/modules/cjs/helpers.js:72:18)
I have run below commands, and issue resolved:
npm install -g minimatch (Enter)
npm install -g graceful-fs (Enter)
npm link gulp (Enter)
Thanks,
PP
Related
When I try and run my mocha tests I get
$ npm t
> digitalAlarmClock#1.0.0 test /home/durrantm/Dropnot/code/js/mochaChai/digitalAlarmClock
> mocha *.test.js
internal/modules/cjs/loader.js:979
throw err;
^
Error: Cannot find module 'commander'
Require stack:
- /usr/lib/nodejs/mocha/bin/_mocha
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:976:15)
at Function.Module._load (internal/modules/cjs/loader.js:859:27)
at Module.require (internal/modules/cjs/loader.js:1036:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/usr/lib/nodejs/mocha/bin/_mocha:10:17)
at Module._compile (internal/modules/cjs/loader.js:1147:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
at Module.load (internal/modules/cjs/loader.js:996:32)
at Function.Module._load (internal/modules/cjs/loader.js:896:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/usr/lib/nodejs/mocha/bin/_mocha' ]
}
npm ERR! Test failed. See above for more details.
How to fix?
here's how I solve the issue:
run npm list to see if there's any dependency missing, for example, I saw:
[root#d21b188bb7e1 configurable-http-proxy]# npm list
configurable-http-proxy#4.3.2 /srv/configurable-http-proxy
├── UNMET DEPENDENCY commander#~7.2.0
...
install it manually by
npm install --save commander#~7.2.0
This can happen for several different reasons.
In this case it is because mocha isn't installed.
Fix with
npm install --save-dev mocha
D:\Alief\Kelas-12\KK4-B\react_native_crud>react-native start error
Below is the error what i am getting after running the above command,
Cannot find module 'metro-resolver'. Run CLI with --verbose flag for
more details. Error: Cannot find module 'metro-resolver' at
Function.Module._resolveFilename
(internal/modules/cjs/loader.js:636:15) at Function.Module._load
(internal/modules/cjs/loader.js:562:25) at Module.require
(internal/modules/cjs/loader.js:690:17) at require
(internal/modules/cjs/helpers.js:25:18) at Object.<anonymous>
(D:\Alief\Kelas-12\KK4-B\react_native_crud\node_modules\metro-
core\src\errors\PackageResolutionError.js:12:18) at Module._compile
(internal/modules/cjs/loader.js:776:30) at
Object.Module._extensions..js (internal/modules/cjs/loader.js:787: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)emphasized text
Have you tried installing the dependency metro-resolver?
Open cmd in your react-native project's folder and run command
npm i metro-resolver & npm install.
if using yarn,
yarn add metro-resolver
&
yarn install
npm i metro-resolver will install "metro-resolver" and npm install will install all the required dependencies mentioned in your package.json .
You can run npm install only but in-case metro-resolver is not on your package.json so you'll have to download it by name npm install metro-resolver otherwise npm install is enough .
Using the following:
node 8.11.2
npm 6.3.0
I then try to install the Vue CLI (#vue/cli#3.0.0):
npm i -g #vue/cli
but when I run the following command:
vue ui
I get the following error:
Error: Cannot find module 'core-js/modules/es7.object.entries'
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:\Apps\caches\npm\node_modules\#vue\cli\node_modules\apollo-upload-server\lib\mi
ddleware.js:14:1)
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)
It turned out I had to install the core-js package explicitly.
npm i -g core-js
Not sure why this wasn't installed as a dependency though.
The issue has been reported HERE and has been fixed in v3.0.1.
I ran the command npm install --save loadash
Then I tried to uninstalling it with the command npm uninstall --save loadash
but after that when I tried to run the app using ionic serve the following error is thrown. What to do?
Cannot find module 'lodash/assign'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/admin/HybridApps/ayrll/node_modules/xmlbuilder/lib/index.js:5:12)
at Object.<anonymous> (/Users/admin/HybridApps/ayrll/node_modules/xmlbuilder/lib/index.js:14:4)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
Cannot find module 'lodash/assign'
Means it is looking for lodash assign somewhere in your code base.
There is one major issue with this command npm uninstall --save loadash , what is "loadash"? it should be "lodash", but besides that if lodash has been removed from your package.json it wont remove any references that are in the code based.
You should do a full search for assign in your code. If there is no results then i would recommend completing a fresh ionic serve to rebuild the project.
I am getting this error while running gulp, I already have babel-register installed.
[18:51:21] Requiring external module babel-register
module.js:327
throw err;
^
Error: Cannot find module './_baseIsRegExp'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (D:\ndbsite\src\NdbSite.UI\node_modules\babel-plugin-transform-class-properties\node_modules\babel-helper-function-name\node_modules\babel-types\node_modules\lodash\isRegExp.js:1:82)
at Module._compile (module.js:409:26)
at Module._extensions..js (module.js:416:10)
at Object.require.extensions.(anonymous function) [as .js] (D:\ndbsite\src\NdbSite.UI\node_modules\babel-register\lib\node.js:156:7)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
seems I am missing some package. Not sure how to find it. Please Help.
The issue I was facing because of old packages referenced inside other Modules were not updated
As suggested by #loganfsmyth in comment. I updated node & npm. Still issue exists since old packages were not updated inside the hierarchy.
Resolution is to delete old folders using rimraf and then npm install with new node & npm :
npm install rimraf -g
rimraf node_modules
npm install