Failed to resolve entry for package "material-symbols" - sveltekit

After installing material-symbols using npm the following message is shown in the console
My steps
Run in the console npm i material-symbols#latest
Add import 'material-symbols'; at the top of the __layout.svelte file
Add <span class="material-symbols-outlined">face</span> to the component file
Open console
Error message is shown
Error message
Failed to resolve entry for package "material-symbols". The package may have incorrect main/module/exports specified in its package.json: Failed to resolve entry for package "material-symbols". The package may have incorrect main/module/exports specified in its package.json.

As was able to run this package by changing the approach. I replaced step 2 with CSS imports.
Instead of
// __layout.svelte
import 'material-symbols';
...
I created 'app.css' file in the src folder. Added #import 'material-symbols'; at the top of its file. Imported app.css into __layout.svelte.
/* app.css */
#import 'material-symbols';
// __layout.svelte
- import 'material-symbols';
+ import '../app.css';
...
It works

Related

Import errors with the package #react-three/drei

I get the same error no matter what I import from the drei package, I am sure I have installed all the necessary packages and the latest versions, but I have this odd error.
Compiled with problems:X
ERROR in ./node_modules/#react-three/drei/core/Trail.js 104:38-54
export 'MeshLineGeometry' (imported as 'MeshLineGeometry') was not found in 'meshline' (module has no exports)
ERROR in ./node_modules/#react-three/drei/core/Trail.js 107:18-34
export 'MeshLineMaterial' (imported as 'MeshLineMaterial') was not found in 'meshline' (module has no exports)
ERROR in ./node_modules/meshline/dist/index.js 1:0-35
Module not found: Error: Can't resolve './MeshLineGeometry' in 'C:\Users\anura\Desktop\mysite\node_modules\meshline\dist'
Did you mean 'MeshLineGeometry.js'?
BREAKING CHANGE: The request './MeshLineGeometry' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
Downgrading not working solved it temporarily as follows.
Copied the index.js from node_modules/meshline/dist to lib/meshline in the root folder
Fixed by adding .js extensions to each line
Updated build steps as in the screenshots
Fixed index.js in lib/meshline
Build steps

Not able to import package in Next js

I installed the Jodit Editor using npm -i jodit-react. The package is added in the node modules but I am unable to import it.
This is is how I am importing the package import JoditEditor from "../../node_modules/jodit-react/index";
And this is the error I am getting: Module not found: Can't resolve '../../node_modules/jodit-react/index'
Screenshot of the error:
Change this line:
import JoditEditor from "../../node_modules/jodit-react/index";
To:
import JoditEditor from 'jodit-react';
You can take a look at this live working example with Next.js

React Failed to compile. Module not found: Can't resolve 'Main.css'

To my React project I added "Main.css" file and I imported it in Navigation.js component. Unfortunately, I get this error "Failed to compile. ./src/components/Navigation.js
Module not found: Can't resolve 'Main.css' in '/Users/monikastrzalka/Documents/INFORMATYKA/WEB DEVELOPMENT PROJECTS/PROJECT2/project2/src/components'". I have no idea why this is happening.That's the first time. Please help me. Below you will find necessary data.
enter image description here
I believe your issue lies in the import
import "./Main.css"
There's a few different ways import trys to find what you're indicating. Currently import is interpreting 'Main.css' as a full package - if there was a 'Main.css' library in your package.json and living in your node_modules folder import would be handling this correctly.
The other way to import is to identify a relative filepath. You can indicate the relative path the same way as your terminal.
If you try:
import "./Main.css"
import will know to look for a relative file pathway that exists inside your project.

Module not found: Can't resolve './reducers/index'

Module not found: Can't resolve './reducers/index' in'C:\Users\Dibba\Desktop\rdx\src'
This error occurred during the build time and cannot be dismissed.
node version is
v9.11.2
npm version is
6.9.1-next.0
structure:
error message :
code:
Your app is not able to find your root reducer since the file name on disk doesn't match the file name in the code. There appears to be a trailing space in the filename of ./reducers/index.js, from what I can see in your first screenshot. Remove the space and your app should be able to find the file without problem.
You have to remove the /index from the directory './reducers/index' and set it to './reducers'. It should work.
If the above does not work for you, check the steps below.
Make sure the reducers folder is created in the 'src' directory and create a file named index.js in the reducers folder.

"Can't load package" and "Use of internal package not allowed" when running goapp test

When I run the command:
goapp test ./...
I get the errors:
can't load package: package github.com/projectname/oauth2: code in directory /Users/nyname/go/src/github.com/projectname/oauth2 expects import "github.com/projectname/oauth2"
can't load package: package github.com/projectname/oauth2/clientcredentials: code in directory /Users/nyname/go/src/github.com/projectname/oauth2/clientcredentials expects import "github.com/projectname/oauth2/clientcredentials"
can't load package: package github.com/projectname/oauth2/google: code in directory /Users/nyname/go/src/github.com/projectname/oauth2/google expects import "github.com/projectname/oauth2/google"
can't load package: package github.com/projectname/oauth2/jws: code in directory /Users/nyname/go/src/github.com/projectname/oauth2/jws expects import "github.com/projectname/oauth2/jws"
package github.com/projectname/oauth2/jwt
imports github.com/projectname/oauth2/internal: use of internal package not allowed
It seems like no one else on my team get's this error.

Resources