I am getting a require() of ES Module error using `npm install semantic-ui-dropdown` command - semantic-ui

I just tried to install semantic-ui on two different machines and received the same error:
`npm ERR! Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/petelombardo/node_modules/del/index.js from /Users/xxx/node_modules/semantic-ui/tasks/clean.js not supported.
npm ERR! Instead change the require of index.js in /Users/xxx/node_modules/semantic-ui/tasks/clean.js to a dynamic import() which is available in all CommonJS modules.`
Please advise. Thank you.
results outlined in the video here.

The semantic ui repo hasnt been updated since 2018, it seems to be a dead project. There is a community fork called fomantic-ui, try using that instead, it doesnt have this issue as its still being maintained.

Related

How to solve dependency error for yarn global add #vue/cli?

Within a mac environment I am trying to upgrade the Vue CLI v4.5.13 to 5.0.8 using yarn as a packet manager
enter image description here
After fetching the packages the terminal result is:
ted (end-of-life October 22nd 2023). This package's functionality is now found in the `#apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
[2/4] 🚚 Fetching packages...
error create-strapi-app#3.6.5: The engine "node" is incompatible with this module. Expected version ">=10.16.0 <=14.x.x". Got "16.17.1"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
Reading the documentation at https://classic.yarnpkg.com/en/docs/cli/global does not help.
I expect to update the VUE CLI regardless to project dependencies and I am missing the command that the command
yarn global upgrade #vue/cli
ignores all existent dependencies and simply updates...
yarn add #vue/cli
finished successfully, but that does not help, due the Vue CLI remains to v4.5.13
What does
Fetching packages...
error create-strapi-app#3.6.5: The engine "node" is incompatible with this module. Expected version ">=10.16.0 <=14.x.x". Got "16.17.1"
states?
Node is incompatible to the node module defined in a local strapi project, right?
How should I handle this and why?
Thank you very much, for your kind explanations...
Trying to update Vue CLI to the latest version and hitting dependency blocks on global layer

I am getting Error during connecting firebase with react native ios

At first i did npm install --save #react-native-firebase/app then cd ios and then pod install and get error like that..
[!] The following Swift pods cannot yet be integrated as static libraries:
The Swift pod FirebaseCoreInternal depends upon GoogleUtilities, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set use_modular_headers! globally in your Podfile, or specify :modular_headers => true for particular dependencies.
then i use my pod file use_modular_headers! globally...then pod install done ,but when i ran the project from xcode it gives me the Error..."glog.glog.log_severity' appears within namespace 'google" please help i dont know xcode and can't solve the issue ...please help ...thanks advance
I just initialized a bare react native project yesterday and ran into this exact same problem when setting up Firebase. I can't remember the exact sequence of steps I took to fix it, but my current Podfile doesn't include use_modular_headers!. Instead, I used "use_frameworks!" globally in my Podfile, and commented out the use_flipper!() at the bottom as recommended in the comments. If you get the same initial error about static libraries, try switching the environment you're running from. I.E. if you've been trying from terminal by "npx react-native run..." use Xcode to compile the build, and vice versa. Hopefully that works, it did for me!

Warning: StringMap expected string key Use --force to continue

grunt build command failed with following results
Please help me....
NOTE:
ngAnnotate:dist reading happened but after that writing is not happening...
bower minification is working. controllers,services js files unable to ngAnnotate
None of controller have any ES6 features (no arrow funtion ==>, no Let,const keywords used to declare)
my package.json file has below modules
I was using "grunt-ng-annotate": "1.0.1" and got the same error. I tried to upgrade but it didn't work.
Since I needed a quick fix, I had to downgrade to 0.10.0 and now it's working fine.
I removed the current version: npm uninstall grunt-ng-annotate --save-dev
And installed the older one: npm install grunt-ng-annotate#0.10.0 --save-dev
I hope it helps!

Using npm modules with electron and webpack?

I want to use sqlite3 with this boilerplate:
https://github.com/bradstewart/electron-boilerplate-vue
I've tried a lot of ways getting require('sqlite3'), to work, but it keeps failing with the error:
Uncaught Error: Cannot find module 'sqlite3'
global.require() did not work
adding it to the webpack.ExternalsPlugin in builds/webpack.base.conf.js did not help
How can I solve this?
This should be able to help you: How to use sqlite3 module with electron?
Basically:
Install electron-rebuild: npm i electron-rebuild --save-dev
Launch electron-rebuild ./node_modules/.bin/electron-rebuild (or
.\node_modules\.bin\electron-rebuild.cmd on windows)
Go to "node_modules/sqlite3/lib/binding/" and rename the folder
"electron-v0.36-darwin-x64" to "node-v47-darwin-x64"

npm: "Error: invalid version: 1.0" while installing grunt plugins

While yesterday all works fine, today i am getting the printed error below, when i try to install a grunt plugin, wether it is a official grunt contrib or vendor plugin.
I am running grunt v0.4, node v0.8.20 and npm v1.2.11, System X 10.8.2.
npm install grunt-<plugin>-<name> --save-dev
npm ERR! Error: invalid version: 1.0
npm ERR! at validVersion (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:590:40)
npm ERR! at final (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:342:23)
...
What suprises me is that also official grunt contrib plugins (grunt-contrib-xxx) fails to install altough i expect it has a proper semver version syntax. npm-debug.log shows nothing additional to the verbose output in the console.
Any hints are appreciated.
Thx in advance
felic
Sorry for replying this late.
I am new to the grunt/nodejs stuff, so I was a bit confused and it took a while to understand what's wrong: I updated grunt to 0.4.~ at that point without editing the related project package.json to reflect the correct grunt versioning ("1.0.0" instead of "0.1.0"). Thanks for your help.
Modify package.json to
"devDependencies" : {
"grunt" : "latest"
}
Now run
sudo npm install
This installs latest grunt.
[Note : Add required dependencies to object and the command will install it all on run]
since grunt 0.4 is aimed at the v1 of node maybe the plugin you're trying to install asks for a 1.0 version of node, try to read the package.js of the plugins yo're trying to install.
as glortho asked, you could tell us explicitely what plugin causes the problem

Resources