vite:load-fallback - Could not load /path/to/package EISDIR: illegal operation on a directory, read - vite

I have a basic skeleton project set up for sveltekit utilizing tailwindcss and stwui. I receive the following error when running this command:
> tester#0.0.1 build
> vite build
vite v3.2.2 building for production...
✓ 11 modules transformed.
[vite:load-fallback] Could not load /.../tester/node_modules/stwui (imported by src/routes/+page.svelte): EISDIR: illegal operation on a directory, read
error during build:
Error: Could not load /.../tester/node_modules/stwui (imported by src/routes/+page.svelte): EISDIR: illegal operation on a directory, read
I have tried to change the exports in package.json and removed all dependecy on svelte/kit functionality (ie. browser, page, etc.).
Here is a link to the stwui package: https://github.com/N00nDay/stwui

Related

problems running npx expo start

i'm trying to start a project using "npx expo start" but i'm getting the same error, i don't know how to solve it. This error started after the new expo update to SDK 46, I already tried to start new projects following the documentation step-by-step, but I keep getting the same error. My operating system is linux.
Error: EISDIR: illegal operation on a directory, read
Error: EISDIR: illegal operation on a directory, read
at Object.readSync (node:fs:748:3)
at tryReadSync (node:fs:448:20)
at Object.readFileSync (node:fs:494:19)
at readPackageJSON (/home/ronaldfleetss/expo2/my-app/node_modules/find-yarn-workspace-root/index.js:50:26)
at findWorkspaceRoot (/home/ronaldfleetss/expo2/my-app/node_modules/find-yarn-workspace-root/index.js:23:22)
at getWorkspaceRoot (/home/ronaldfleetss/expo2/my-app/node_modules/#expo/metro-config/build/getModulesPaths.js:34:49)
at getWatchFolders (/home/ronaldfleetss/expo2/my-app/node_modules/#expo/metro-config/build/getWatchFolders.js:124:65)
at getDefaultConfig (/home/ronaldfleetss/expo2/my-app/node_modules/#expo/metro-config/build/ExpoMetroConfig.js:253:63)
at Object.loadAsync (/home/ronaldfleetss/expo2/my-app/node_modules/#expo/metro-config/build/ExpoMetroConfig.js:352:23)
at Object.instantiateMetroAsync (/home/ronaldfleetss/expo2/my-app/node_modules/#expo/cli/build/src/start/server/metro/instantiateMetro.js:27:45)
I need help, I've tried to make several changes in the application, I've also tried to enter the node's default folder and give all possible permissions, but I don't know if the error is in the expo or in nodejs.
making some observations I've already uninstalled the global expo, I've also made changes to the package.json as requested in the expo documentation. I've also tried running npm install to update the new changes, but with no success.

Integrating Semantic UI with a Gatsby Project - build fails due to missing closing ')'

failed Building development bundle - 14.691s
ERROR in ./src/semantic/semantic.less
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/less-loader/dist/cjs.js):
;(function ($, window, document, undefined) {
^
Missing closing ')'
1 ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
webpack compiled with 2 errors
Following this article (https://www.artembutusov.com/webpack-semantic-ui/) and also checked out the thread here (https://github.com/Semantic-Org/Semantic-UI-LESS/issues/38). Downgrading the version for less hasn't worked.
Found a way to integrate semantic-ui without following the above linked article.
Run: npm install semantic-ui-css --save
Then import at the top level index.js page: import 'semantic-ui-css/semantic.min.css';
How to install and use semantic-ui-react

Error: Can't walk dependency graph: ENOENT: no such file or directory (process)

I am using browserify v17.0.0 in order to use node.js modules in a web project. This was working fine until today when I attempted to convert src file as follows:
call browserify web-src.js -o web.js
Error: Can't walk dependency graph: ENOENT: no such file or directory, lstat '${home_dir}\process'
required by ${home_dir}\node_modules\mysql2\lib\pool.js
(very odd as I haven't changed the version of browserify or any of the code!).
The process module is present in node_modules, and I have tried clearing npm cache and completely reinstalling with npm install
If I disable all imports that use the mysql2 library above, then I can compile web.js successfully with the above commands. However, when I attempt to serve this file with an express.js web server, there is an error:
Uncaught TypeError: Cannot read properties of undefined (reading 'split')
at Object.<anonymous> (web.js:122518)
at Object.<anonymous> (web.js:122527)
at Object.780../lib/telegram (web.js:122527)
at o (web.js:1)
at web.js:1
at Object.<anonymous> (web.js:171670)
at Object.<anonymous> (web.js:171981)
at Object.944.../database/database-functions (web.js:171981)
at o (web.js:1)
at web.js:1
Which refers to the following line in the compiled code:
const majorVersion = parseInt(process.versions.node.split('.')[0]
Ok - I should not have been trying to use the node.js process API in a browser context.
Turns out there were code changes which imported modules using the process API and this is how the error manifested itself.
Strangely enough, when the mysql2 package was imported, this prevented compilation.
Once this was removed, web.js compiled but telegram API package caused the runtime error also seen above

How to deal with a conflict between packages that involve typescript?

I was following this tutorial for creating a whatsapp clone on meteor: https://angular-meteor.com/tutorials/whatsapp2/meteor/chats-mutations
and was right at the bottom of section 8. I ran the
$meteor reset command
as instructed however, when I then ran the
$ npm run start
in the terminal, I got the following error:
=> Started proxy.
=> Errors prevented startup:
While building the application:
error: Could not resolve meteor.mainModule "server/main.js" in package.json
(os)
error: Could not resolve meteor.mainModule "client/main.js" in package.json
(web.browser)
error: Could not resolve meteor.mainModule "client/main.js" in package.json
(web.browser.legacy)
error: Could not resolve meteor.mainModule "client/main.js" in package.json
(web.cordova)
While determining active plugins:
error: conflict: two packages included in the app (barbatus:typescript and
typescript) are both trying to handle *.ts
error: conflict: two packages included in the app (barbatus:typescript and
typescript) are both trying to handle *.tsx
While loading plugin `compileFonts` from package `mys:fonts`:
<anonymous>: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at getConfig (packages/compileFonts/plugin.js:70:23)
at meteorInstall.node_modules.meteor.compileFonts.plugin.js
(packages/compileFonts/plugin.js:18:25)
at fileEvaluate
(packages/modules-runtime/.npm/package/node_modules/install/install.js:141:1)
at require
(packages/modules-runtime/.npm/package/node_modules/install/install.js:75:1)
at <runJavaScript-49>:17308:1
at <runJavaScript-49>:17314:3
While determining active plugins:
error: conflict: two packages included in the app (barbatus:typescript and
typescript) are both trying to handle *.ts
error: conflict: two packages included in the app (barbatus:typescript and
typescript) are both trying to handle *.tsx
While determining active plugins:
error: conflict: two packages included in the app (barbatus:typescript and
typescript) are both trying to handle *.ts
error: conflict: two packages included in the app (barbatus:typescript and
typescript) are both trying to handle *.tsx
While determining active plugins:
error: conflict: two packages included in the app (barbatus:typescript and
typescript) are both trying to handle *.ts
error: conflict: two packages included in the app (barbatus:typescript and
typescript) are both trying to handle *.tsx
=> Your application has errors. Waiting for file change.
=> Started MongoDB.
What should I do to solve this problem?
If it helps, I am doing this project in Visual Studio Code
Meteor has now official Typescript support, you can safely drop barbartus:typescript however it's a peer dependency in a package of the tutorial's repo (it has not been updated in 3 years).
Remove the angular2-compilers from .meteor/packages and replace it with the angular-compilers (link) which should make it work.

Why do I get a node_modules error when I try to initialize a new Stencil project?

I'm just beginning to use Bigcommerce's Stencil language and I'm stuck in the documentation when I attempt to initialize their sample project (https://github.com/bigcommerce-stencil/stencil.git).
I've cloned the repo and done the necessary installations (I've tried this using Node version 4.2.1, 4.2.3, and 5.0.0). When I type stencil init from within the stencil directory, this is the error message I get:
Potentially unhandled rejection [6] Error: Error loading "node_modules/core-js/library/fn/get-iterator" at file:/Users/Eric/Development/econify/stencil/assets/node_modules/core-js/library/fn/get-iterator.js
Error loading "node_modules/core-js/library/fn/get-iterator" from "js/app" at file:/Users/Eric/Development/econify/stencil/assets/js/app.js
ENOENT: no such file or directory, open '/Users/Eric/Development/econify/stencil/assets/node_modules/core-js/library/fn/get-iterator.js' at Error (native)
Any ideas?

Resources