sindresorhus / path-type Goto Github PK
View Code? Open in Web Editor NEWCheck if a path is a file, directory, or symlink
License: MIT License
Check if a path is a file, directory, or symlink
License: MIT License
I'm hitting a similar issue to TypeStrong/ts-node#155 (comment) with ava
and ts-node
while importing this in one of the functions I'm testing.
If there's no fix feel free to close this. I figured I couldn't hurt to open and at least others will now be able to find this.
Uncaught exception in test/app/graphql/resolvers/query/display.ts
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users/xo/code/unraid/api/node_modules/path-type/index.js
require() of ES modules is not supported.
require() of /Users/xo/code/unraid/api/node_modules/path-type/index.js from /Users/xo/code/unraid/api/app/core/modules/info/get-all-devices.ts 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 /Users/xo/code/unraid/api/node_modules/path-type/package.json.
› Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from node_modules/path-type/package.json.
› Object.<anonymous> (app/core/modules/info/get-all-devices.ts:4:4)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.