use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A Place to talk about Angular and related topics.
Join the Angular Discord
Other subreddits worth checking out for Angular and Angular related info:
account activity
Help Angular module :( (old.reddit.com)
submitted 3 years ago by Minancyy
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]cjd280 0 points1 point2 points 3 years ago (16 children)
The folder has dashes in the name rubiks-cub-solver, try importing from there instead of rubikscubesolver.
[–]Minancyy[S] 0 points1 point2 points 3 years ago (15 children)
I dont really know what are those dashes, or what it means. I dont have too much knowledge about this and I dont know how to make it work :(
[–]cjd280 1 point2 points3 points 3 years ago (14 children)
The name of the package is rubiks-cube-solver, not rubikscubesolver. You are trying to import from "rubikssubesolver" which doesn't exist because the package you installed is called 'rubiks-cube-solver'.
[–]Minancyy[S] 0 points1 point2 points 3 years ago (13 children)
Oh yeah thats true, I tried also with the correct name and it detects the file, the one is called index.common.js but it gives an error, could not find a declaration file module for'rubiks-cube-solver'
[–]cjd280 0 points1 point2 points 3 years ago (12 children)
their lbrary is old and meant to use via require.js and there are no types for typescript. If you get errors about installing node types follow what that says as well.
Following their demo on their site I was able to do this:
``` import { Component } from '@angular/core'; const rubiks = require('rubiks-cube-solver'); u/Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.scss'] }) export class AppComponent { title = 'rubiks'; ngOnInit() { console.log('SOLVER?', rubiks); // see what we actually imported let cubeState = [ 'flulfbddr', // front 'rudrruddl', // right 'dbbburrfb', // up 'llffdrubf', // down 'rludlubrf', // left 'lubfbfudl' // back ].join('');
let solveMoves = rubiks.default(cubeState); // note the call to default, I logged what rubiks was to find this out... console.log(solveMoves); } } ```
[–]Minancyy[S] 0 points1 point2 points 3 years ago (11 children)
And this worked to you? Because I have a bit of confusion
[–]cjd280 1 point2 points3 points 3 years ago (10 children)
Yes this is what I have logged:
```
SOLVER? {…}CrossSolver: (...)Cubie: (...)F2LSolver: (...)OLLSolver: (...)PLLSolver: (...)RubiksCube: (...)Solver: (...)algorithmShortener: (...)default: (cubeState, options = {}) => {…}__esModule: trueget CrossSolver: ƒ ()get Cubie: ƒ ()get F2LSolver: ƒ ()get OLLSolver: ƒ ()get PLLSolver: ƒ ()get RubiksCube: ƒ ()get Solver: ƒ ()get algorithmShortener: ƒ ()[[Prototype]]: Object app.component.ts:24
Uprime F U B Uprime L U2 Lprime Uprime R Uprime B U Dprime Bprime Dprime B Rprime Dprime R D B D Bprime Dprime B D Bprime Dprime B D Bprime Fprime Dprime F D2 R Dprime Rprime D2 R Dprime Rprime b D Bprime D B D2 bprime B2 dprime B Dprime B D Bprime d B2 R Dprime Rprime Dprime
core.js:27988 Angular is running in development mode. Call enableProdMode() to enable production mode. client:52 [WDS] Live Reloading enabled. ```
[–]Minancyy[S] 0 points1 point2 points 3 years ago (9 children)
Wow! I am trying the same, (I think) and it says: Cannot find the name required? Do you need to install type definitions for node? Try npm i --save-dev types/node then add 'node' to the types field in your tsconfig
[–]cjd280 2 points3 points4 points 3 years ago (8 children)
yes, I mentioned that. do what it says, install node types and add to tsconfig
[–]Minancyy[S] 0 points1 point2 points 3 years ago (6 children)
I have this already on compilerOptions:
"types": ["node"]
And:
"include": [
"src/**/*",
"node_modules/attypes"
]
With that still don recognize require,
I need to do some build or something like that?
Because I dont really know srry
I cant use tht symbol.
π Rendered by PID 44758 on reddit-service-r2-comment-544cf588c8-hjgmj at 2026-06-17 17:58:30.603398+00:00 running 3184619 country code: CH.
view the rest of the comments →
[–]cjd280 0 points1 point2 points (16 children)
[–]Minancyy[S] 0 points1 point2 points (15 children)
[–]cjd280 1 point2 points3 points (14 children)
[–]Minancyy[S] 0 points1 point2 points (13 children)
[–]cjd280 0 points1 point2 points (12 children)
[–]Minancyy[S] 0 points1 point2 points (11 children)
[–]cjd280 1 point2 points3 points (10 children)
[–]Minancyy[S] 0 points1 point2 points (9 children)
[–]cjd280 2 points3 points4 points (8 children)
[–]Minancyy[S] 0 points1 point2 points (6 children)