Comments (4)
@xme Hi, it's very strange to me.
In CI(GitHub Actions). this package is tested with the following combinations and there is no such issue.
- Node.js v16 + npm v7
- Node.js v14 + npm v6
(https://github.com/ninoseki/ioc-extractor/blob/master/.github/workflows/test.yml#L10-L24)
Also, I'm using this package with Node.js v14 + npm v7 in my laptop.
Thus I guess you are using very old Node.js + npm. If so could you update Node.js and npm, please?
from ioc-extractor.
I also tested with the official node Docker image…
root@e7a8590c4a7e:/# ioc-extractor
node:internal/modules/cjs/loader:1126
throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);
^
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /usr/local/lib/node_modules/ioc-extractor/node_modules/get-stdin/index.js
require() of ES modules is not supported.
require() of /usr/local/lib/node_modules/ioc-extractor/node_modules/get-stdin/index.js from /usr/local/lib/node_modules/ioc-extractor/dist/bin/ioc-extractor.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /usr/local/lib/node_modules/ioc-extractor/node_modules/get-stdin/package.json.
at new NodeError (node:internal/errors:363:5)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1126:13)
at Module.load (node:internal/modules/cjs/loader:989:32)
at Function.Module._load (node:internal/modules/cjs/loader:829:14)
at Module.require (node:internal/modules/cjs/loader:1013:19)
at require (node:internal/modules/cjs/helpers:93:18)
at Object.<anonymous> (/usr/local/lib/node_modules/ioc-extractor/dist/bin/ioc-extractor.js:14:21)
at Module._compile (node:internal/modules/cjs/loader:1109:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
at Module.load (node:internal/modules/cjs/loader:989:32) {
code: 'ERR_REQUIRE_ESM'
}
root@e7a8590c4a7e:/# npm -v
7.15.1
root@e7a8590c4a7e:/# nodejs -v
v16.3.0
root@e7a8590c4a7e:/#
from ioc-extractor.
@xme Hi, sorry it's my bad.
I just fixed the issue in the latest version. Could you update the package and try it again, please?
from ioc-extractor.
Confirmed working now, tx for your help!
from ioc-extractor.
Related Issues (15)
- Add an executable
- Use VerbalExpressions
- URL Regex not matching some valid URLs HOT 1
- Cannot deal with `http[:]` type of defang technique
- Action Required: Fix Renovate Configuration
- Email Regex does not include dashes HOT 1
- Dependency Dashboard
- Filter unicode quotation marks HOT 1
- FR: Add tracker type IOC support
- URLs that do not start with https?:// HOT 1
- Domain extracting issue
- Remove Files type
- URL regex issue HOT 1
- Folder search HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ioc-extractor.