Git Product home page Git Product logo

create-scandipwa-app's Introduction

ScandiPWA

The next-generation front-end for Magento 2. Fast. Reliable. Extensible.


Key features

✅ 350+ Magento features supported

Customize your PWA directly from Magento back-end configurations and use settings like:

  • Multistore
  • Localization
  • Price Rules
  • Tax and more!

Discover the complete feature list.

🚦 Middleware-less design

Data-integrity and simple server setup. Changes from Magento 2 admin are reflected immediately on your PWA storefront.

Sounds interesting? Make sure to :star: scandipwa/scandipwa repository so you can keep up to date with the latest releases!

🏗️ Extensible architecture

Powered by Create ScandiPWA App.

🎁 BONUS! You will get ESLint rules covering:

  • Well-thought file-structure
  • Naming-convention
  • Component organization patterns

Need help?

Here are some awesome resources to start with!

Still feeling lost? Join our 👥 Slack channel and ask community directly! Alternatively, start a new 💬 Discussion on GitHub!

Experience demo

40000 SKU Demo
Visit demo

40 000 SKUs Store

Hight performance even with large catalog.

See the list of feature highlights here.

Realistic Store
Visit demo

Realistic Store Experience

Technology retailer store with real products and images.

See the list of feature highlights here.

Luma Store
Visit demo

Luma Default Data Demo

Compare against default Magento Luma theme.

See the list of feature highlights here.

Want to schedule a guided demo? → 📧 Contact Us

See it in action

Check the list of live websites built with ScandiPWA.

Case Studies

Contribution

We'd love to have your helping hand on scandipwa! See CONTRIBUTING.md for more information on what we're looking for and how to get started.

Thanks to these awesome ❤️ people for contribution!

License

ScandiPWA is open source software licensed as OSL-3.

create-scandipwa-app's People

Contributors

aleksandrskondratjevs avatar alfredsgenkins avatar carinadues avatar ejnshtein avatar ivanszuks avatar lianastaskevica avatar st0n1k-dev avatar vromash avatar winniepukki avatar yeegor avatar zans-laksa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

create-scandipwa-app's Issues

Create new app crashing hard on latest version

Describe the bug

Install app crash

Steps to reproduce

npx create-scandipwa-app my-app

Expected behavior

Local environment should start.

Actual behavior

Error :

`npx create-scandipwa-app myapp
Need to install the following packages:
create-scandipwa-app
Ok to proceed? (y) y
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: [email protected]
npm WARN node_modules/react-scripts
npm WARN react-scripts@"4.0.1" from @scandipwa/[email protected]
npm WARN node_modules/@scandipwa/scandipwa-scripts
npm WARN @scandipwa/scandipwa-scripts@"2.3.7" from the root project
npm WARN 1 more (@scandipwa/scandipwa)
npm WARN 1 more (@craco/craco)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react-scripts@"^2.1.3" from [email protected]
npm WARN node_modules/craco-sass-resources-loader
npm WARN craco-sass-resources-loader@"^1.1.0" from @scandipwa/[email protected]
npm WARN node_modules/@scandipwa/scandipwa-scripts
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: [email protected]
npm ERR! node_modules/typescript
npm ERR! typescript@"^4.0.3" from @scandipwa/[email protected]
npm ERR! node_modules/@scandipwa/eslint-config
npm ERR! @scandipwa/eslint-config@"0.1.17" from @scandipwa/[email protected]
npm ERR! node_modules/@scandipwa/scandipwa-scripts
npm ERR! @scandipwa/scandipwa-scripts@"2.3.7" from the root project
npm ERR! 1 more (@scandipwa/scandipwa)
npm ERR! peer typescript@">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" from [email protected]
npm ERR! node_modules/tsutils
npm ERR! tsutils@"^3.17.1" from @typescript-eslint/[email protected]
npm ERR! node_modules/@typescript-eslint/eslint-plugin
npm ERR! @typescript-eslint/eslint-plugin@"^4.5.0" from @scandipwa/[email protected]
npm ERR! node_modules/@scandipwa/eslint-config
npm ERR! @scandipwa/eslint-config@"0.1.17" from @scandipwa/[email protected]
npm ERR! node_modules/@scandipwa/scandipwa-scripts
npm ERR! 3 more (react-scripts, eslint-config-react-app, eslint-plugin-jest)
npm ERR! tsutils@"^3.17.1" from @typescript-eslint/[email protected]
npm ERR! node_modules/@typescript-eslint/typescript-estree
npm ERR! @typescript-eslint/typescript-estree@"4.8.2" from @typescript-eslint/[email protected]
npm ERR! node_modules/@typescript-eslint/parser
npm ERR! @typescript-eslint/parser@"^4.5.0" from @scandipwa/[email protected]
npm ERR! node_modules/@scandipwa/eslint-config
npm ERR! 3 more (react-scripts, @typescript-eslint/eslint-plugin, eslint-config-react-app)
npm ERR! 1 more (@typescript-eslint/experimental-utils)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional typescript@"^3.2.1" from [email protected]
npm ERR! node_modules/react-scripts
npm ERR! react-scripts@"4.0.1" from @scandipwa/[email protected]
npm ERR! node_modules/@scandipwa/scandipwa-scripts
npm ERR! @scandipwa/scandipwa-scripts@"2.3.7" from the root project
npm ERR! 1 more (@scandipwa/scandipwa)
npm ERR! peer react-scripts@"*" from @craco/[email protected]
npm ERR! node_modules/@craco/craco
npm ERR! peer @craco/craco@"^3.3.1" from [email protected]
npm ERR! node_modules/craco-sass-resources-loader
npm ERR! craco-sass-resources-loader@"^1.1.0" from @scandipwa/[email protected]
npm ERR! node_modules/@scandipwa/scandipwa-scripts
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/user/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2021-04-03T17_24_00_212Z-debug.log
node:internal/process/promises:245
triggerUncaughtException(err, true /* fromPromise */);
^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "undefined".] {
code: 'ERR_UNHANDLED_REJECTION'`

Problem with setting up scandipwa in VScode

Hello guys so i have an issue I'm trying to setup scandi PWA locally following this guide:https://docs.scandipwa.com/hands-on-tutorials/lets-talk-theory.
I was following the steps but after i run npm start im getting the following error:
./node_modules/@scandipwa/webpack-i18n-runtime/src/util/localeMap.js Module not found: Can't resolve 'C:UsersAdamDocumentsCodingscandikesapotlac
I have no idea what could be the problem i tried different versions of node. Also tried with yarn but nothing seems to work. Thanks for your help it would really help me a lot as I'm using this for my project and I'm stuck on this issue for days now.

Performance of this.containerProps

Describe the bug

It seems like this.containerProps returns new object every time, thus, later when comparing with === in PureComponent it always says the objects are different, thus re-render happens.

Maybe we need some shouldUpdate interface there?

Setting up with existing Magento 2 installation

I'm trying to setup with Storefront mode. As per the documentation composer update fails with below errors.
Please advise. Appreciate your support in advance.

Ubuntu 20.4
PHP 7.4.26
Magento Version: 2.4.3

image

composer update in backend root

image

Thank you.

Windows: Module not found: Can't resolve, the path.

Description:
I encountered a strange issue this morning(11.1.2021), when trying to do an npm start on my windows machine.
The error on the console says:

./node_modules/@scandipwa/scandipwa/src/index.js
Module not found: Can't resolve 'C:UsersxxxDesktopscandipwa-app	est-app

i am trying to create a scandipwa app using npx create-scadipwa-app test-app in my C:/Users/xxx/Desktop/scandipwa-app folder.
It seems it is ignoring the / (slash) in the folder path.

Expected behavior:
to load scandipwa theme on localhost:3000/

Screenshots, Video, Logs

To Reproduce:

Open terminal
npx create-scandipwa-app
npm install.
Versions:

node -v: v12.13.1
npm -v: 6.12.1
OS: Window

i18n: every letter is an HTML node

Is your proposal related to a problem?

See title

Describe the solution you'd like

Every letter in any translated word should not be an HTML node. Only the word itself should be.

ScandiPWA CLI: `deploy` fails to recognize Scandi theme

Describe the bug

When running the latest version of the scandipwa CLI, scandipwa deploy produces an incorrect error instead of successfully completing.

Environment

Reproduced on Ubuntu 20. I tried this on a new CSA app as well as a slightly older version. Another user has reproduced this on Windows.

Steps to reproduce

  1. Create a new theme with CSA.
  2. cd into the theme directory
  3. Run scandipwa deploy

Expected behavior

The Scandi theme should be deployed to the cloud with no errors.

Actual behavior

We get an error about not being in a theme directory, even though this is a CSA theme, and the package.json is configured correctly.

ERROR!

     To deploy your code you must be located in ScandiPWA theme directory.
     We looked up six folders up starting from /home/r/sw-proj/tmp/test-csa-2!
     There was no folders containing package.json, where scandipwa.type field was equal to theme.

This error message is wrong. I am certain my cwd is a Scandi app, and indeed it contains a package.json with scandipwa.type=theme.

Note that scandipwa create component TestComponent seems to work correctly, so everything is set up correctly.

Failed to load config "@scandipwa" to extend from.

Describe the bug

On running BUILD_MODE=magento yarn build or BUILD_MODE=magento yarn start, and also without build mode, getting an error saying:

Failed to compile.

Failed to load config "@scandipwa" to extend from.
Referenced from: BaseConfig

Did you try recovering your dependencies?

Yes, removed the below, and ran yarn again, and fetched all deps.

* node_modules
* package-lock.json
* yarn.lock

Please paste the output of npm --version and/or yarn --version to confirm.

yarn --version
1.22.10

Which terms did you search for in User Guide?

Magento Theme

Environment

Host is Ubuntu 18.04.
Node is v14.15.4
NPM is v6.14.13

Steps to reproduce

For an existing Magento 2.4.2 project, followed the steps mentioned here and here

  1. yarn create scandipwa-app my-app
  2. cd my-app
  3. yarn start

Expected behavior

Using BUILD_MODE=magento yarn start, expected the theme to compile successfully.

Actual behavior

Got the error:

Failed to compile.

Failed to load config "@scandipwa" to extend from.
Referenced from: BaseConfig

Screenshot 2021-06-24 at 1 37 24 AM

Internationalization docs are unclear

Is your proposal related to a problem?

Translation (internationalization) docs (https://docs.create-scandipwa-app.com/building-your-app/internationalization) are unclear.

Describe the solution you'd like

I would like them to follow following structure:

  • Definition of meaning / function
  • Instruction / Example of implementation (step-by-step)
  • Other details / reference for in-depth analysis

Please do not forget this package is not available in default CSA. I would add two instructions:

  1. Creating new translation bundles (languages)
  2. Integrating the i18n package

failde to complie scandipwa yarn start issue

Failed to compile.

./node_modules/@scandipwa/scandipwa/src/index.js 35:7
Module parse failed: Unexpected token (35:7)
File was processed with these loaders:

  • ./node_modules/@tilework/mosaic-webpack-import-loader/index.js
    You may need an additional loader to handle the result of these loaders.
    | }
    |

render(, document.getElementById('root'));

ScandiPWA version is not locked in the extensions

Is your proposal related to a problem?

It is not ensured in any way that a ScandiPWA extension one is installing into their application is compatible with the ScandiPWA version.

Describe the solution you'd like

A strict (or at least some strict-ish) ScandiPWA version as a peerDependency of the extension should help with this.

Create Scandipwa App Bug

Failed to compile.
./node_modules/@scandipwa/scandipwa/src/index.js 35:7
Module parse failed: Unexpected token (35:7)
File was processed with these loaders:

  • ./node_modules/@tilework/mosaic-webpack-import-loader/index.js
    You may need an additional loader to handle the result of these loaders.
    | }
    |

render(, document.getElementById('root'));
|

I am Getting this error when i run npm run start command after installed csa on my machine
Terminal Shows me Above Error

Sometimes, wrong packages are linked

Describe the bug

The current package linking flow is as follows:

  1. go to the linkable package
  2. run npm link
  3. go to the target package
  4. run npm link <linkable package **name**>

This flow breaks on step 2 when a package with such a name already is linked. It does not get overwritten, and hence in step 4 - the old package gets linked. A possible solution for this would be to unlink the package before linking it again.

Steps to reproduce

(Write your steps here:)

  1. Have a CSA project with a local package named X
  2. Outside of that project, create another (different!) package with name X, run npm link on that
  3. Run dep linking in your project

Expected behavior

The package from step 1 is linked

Actual behavior

The package from step 2 is linked

Composer Version Check

Now we provide strict composer versions in order to prevent issues when backend module has updates that aren't suitable to old frontend, but we don't have ability to update frontend.

But now if i want to update backend module on purpose, i get this error when i start theme:

The 3.1.28 version is the minimum requested version.
Update it at you own risk! The version of choice must meet following constraints: 3.1.28!

While in the same time i have 3.1.31 installed by composer.

The composer version checking code should compare and allow package versions if they are greater.
Also it would be nice to output all conflicting versions on the same screen, than check versions one by one and stop on the first conflict.

Cannot Build CSA In Magento Mode

If i build the app in magento mode (BUILD_MODE=magento yarn run build), it gives this error:

Build completed in 13.81s

Compiled successfully.

File sizes after gzip:

ENOENT: no such file or directory, open '/home/zhan/Projects/ppp/build/static/css/0.d1ed483c.chunk.css'

There is no error if i build app without BUILD_MODE=magento

yarn 1.22.10
npm 6.14.12
@scandipwa/scandipwa 4.5.1
@scandipwa/scandipwa-scripts 2.4.14
@scandipwa/eslint-config 0.1.30
@tilework/mosaic 0.1.4

Automatic testing

Is your proposal related to a problem?

The CSA packages break all the time and we are unable to track it before the releases.

Describe the solution you'd like

Implement a stable testing flow in order to know when something breaks, possibly disallow publishing with broken functionality.

Error when running start command

Description

After I install the project following this guide, and then run yarn start, the website doesn't load because http://localhost:3000/graphql?hash=2572027216&_currency="" return
{"errors":[{"message":"Cannot query field \"is_state_required\" on type \"Country\".","extensions":{"category":"graphql"}},{"message":"Cannot query field \"productReviewRatingsMetadata\" on type \"Query\".","extensions":{"category":"graphql"}},{"message":"Cannot query field \"downloadable_links_target_new_window\" on type \"StoreConfig\".","extensions":{"category":"graphql"}},{"message":"Cannot query field \"address_lines_quantity\" on type \"StoreConfig\".","extensions":{"category":"graphql"}},{"message":"Cannot query field \"wishlist_general_active\" on type \"StoreConfig\".","extensions":{"category":"graphql"}},{"message":"Cannot query field \"display_product_stock_status\" on type \"StoreConfig\".","extensions":{"category":"graphql"}},{"message":"Cannot query field \"show_vat_number_on_storefront\" on type \"StoreConfig\".","extensions":{"category":"graphql"}},{"message":"Cannot query field \"show_tax_vat_number\" on type \"StoreConfig\".","extensions":{"category":"graphql"}},{"message":"Cannot query field \"product_use_categories\" on type \"StoreConfig\".","extensions":{"category":"graphql"}},{"message":"Cannot query field \"cookie_lifetime\" on type \"StoreConfig\". Did you mean \"cookie_link\" or \"cookie_text\"?","extensions":{"category":"graphql"}},{"message":"Cannot query field \"plp_list_mode\" on type \"StoreConfig\".","extensions":{"category":"graphql"}},{"message":"Cannot query field \"layered_navigation_product_count_enabled\" on type \"StoreConfig\".","extensions":{"category":"graphql"}},{"message":"Cannot query field \"region_display_all\" on type \"StoreConfig\".","extensions":{"category":"graphql"}},{"message":"Cannot query field \"redirect_dashboard\" on type \"StoreConfig\".","extensions":{"category":"graphql"}},{"message":"Cannot query field \"newsletter_general_active\" on type \"StoreConfig\".","extensions":{"category":"graphql"}},{"message":"Cannot query field \"newsletter_subscription_allow_guest_subscribe\" on type \"StoreConfig\".","extensions":{"category":"graphql"}},{"message":"Cannot query field \"newsletter_subscription_confirm\" on type \"StoreConfig\".","extensions":{"category":"graphql"}},{"message":"Cannot query field \"priceTaxDisplay\" on type \"StoreConfig\".","extensions":{"category":"graphql"}},{"message":"Cannot query field \"currencyData\" on type \"Query\".","extensions":{"category":"graphql"}},{"message":"Cannot query field \"getCartDisplayConfig\" on type \"Query\".","extensions":{"category":"graphql"}}]}

Accessing https://40kskudemo.scandipwa.com//graphql?hash=2529538179&_currency=%22%22 is still good.

Environment

  • node: 14.15.0

  • npm: 6.14.8

  • mac 10.15.7

  • package.json:

    {
    "name": "my-first-app",
    "version": "0.0.1",
    "license": "OSL-3.0",
    "dependencies": {
    "@scandipwa/scandipwa": "4.5.1",
    "@scandipwa/scandipwa-scripts": "2.4.14",
    "@scandipwa/eslint-config": "0.1.30",
    "@tilework/mosaic": "0.1.4"
    },
    "scandipwa": {
    "type": "theme",
    "locales": {
    "en_US": true
    },
    "parentTheme": "@scandipwa/scandipwa",
    "extensions": {}
    },
    "scripts": {
    "start": "scandipwa-scripts start",
    "build": "scandipwa-scripts build"
    },
    "browserslist": {
    "production": [
    ">0.2%",
    "not dead",
    "not op_mini all"
    ],
    "development": [
    "last 1 chrome version",
    "last 1 firefox version",
    "last 1 safari version"
    ]
    },
    "eslintConfig": {
    "extends": "@scandipwa"
    },
    "proxy": "https://40kskudemo.scandipwa.com/"
    }

  • yarn.lock: The file is too long so I uploaded it here https://drive.google.com/file/d/1Zw6zYun4xK_uRBFpcs_-o2BiM9UG2--Y/view?usp=sharing

Thank you for spending time reading this issue.

Reference to React.Component break an app

Describe the bug

For some reason, potentially for some babel-specific reason the following code: import React from "react"; and then React.Component did not function correctly. Use the import { Component } from "react"; instead. This is a bug, but I am not sure if I will be able to address it soon enough.

The following error is displayed:
Property name expected type of string but got null

This can be reproduced from this repo: jherr/scandipwa-demo-code#1

ESLint use-magic-construct throwing error

Describe the bug

In a specific scenario we have in our PWA v3 instance the linter bugs out and dies. This is preventing us linting the entire project in one go.

Did you try recovering your dependencies?

They are coming from our PWA v3 installation.

Environment

Node 15.5.1
NPM 7.4.0
Other versions are locked in package-lock.json in the example repo.

Steps to reproduce

Repo that should show the issue:
https://github.com/MagicLegend/spwa-eslint-issue

  1. Run npm run eslint:1
  2. Observe error thrown

Expected behavior

Linter throwing use-magic-construct rule.

Actual behavior

± % npm run eslint:1
                                                                                                                                                                                                                                                                              
> [email protected] eslint:1                                                                                                                                                                                                                                            
> eslint --cache --resolve-plugins-relative-to . --ignore-pattern *.test.* ./src/Test.handler.js
                                                                                                                                       
Warning: React version was set to "detect" in eslint-plugin-react settings, but the "react" package is not installed. Assuming latest React version for linting.
                                                                   
Oops! Something went wrong! :(
                                                                   
ESLint: 7.27.0                             
                                                                   
TypeError: Cannot read property 'name' of null
Occurred while linting /home/magiclegend/Documents/tmp/spwa-eslint-issue/src/Test.handler.js:13
    at MethodDefinition (/home/magiclegend/Documents/tmp/spwa-eslint-issue/node_modules/@scandipwa/eslint-plugin-scandipwa-guidelines/lib/rules/use-magic-construct.js:22:47)                                                                                                 
    at /home/magiclegend/Documents/tmp/spwa-eslint-issue/node_modules/eslint/lib/linter/safe-emitter.js:45:58                                                                                                                                                                 
    at Array.forEach (<anonymous>)
    at Object.emit (/home/magiclegend/Documents/tmp/spwa-eslint-issue/node_modules/eslint/lib/linter/safe-emitter.js:45:38)                                                                                                                                                   
    at NodeEventGenerator.applySelector (/home/magiclegend/Documents/tmp/spwa-eslint-issue/node_modules/eslint/lib/linter/node-event-generator.js:293:26)                                                                                                                    
    at NodeEventGenerator.applySelectors (/home/magiclegend/Documents/tmp/spwa-eslint-issue/node_modules/eslint/lib/linter/node-event-generator.js:322:22)
    at NodeEventGenerator.enterNode (/home/magiclegend/Documents/tmp/spwa-eslint-issue/node_modules/eslint/lib/linter/node-event-generator.js:336:14)                                                                                                                         
    at CodePathAnalyzer.enterNode (/home/magiclegend/Documents/tmp/spwa-eslint-issue/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:711:23)                                                                                                         
    at /home/magiclegend/Documents/tmp/spwa-eslint-issue/node_modules/eslint/lib/linter/linter.js:954:32
    at Array.forEach (<anonymous>) 

Reproducible demo

https://github.com/MagicLegend/spwa-eslint-issue

Note that I've also gotten it to throw this when there is no Namespace:

± % eslint --resolve-plugins-relative-to . <path_to_specific_handler>.handler.js
Warning: React version was set to "detect" in eslint-plugin-react settings, but the "react" package is not installed. Assuming latest React version for linting.

Oops! Something went wrong! :(

ESLint: 7.26.0

TypeError [ERR_INVALID_ARG_TYPE]: The "from" argument must be of type string. Received undefined
    at new NodeError (node:internal/errors:278:15)
    at validateString (node:internal/validators:123:11)
    at Object.relative (node:path:1095:5)
    at generateNamespace (/home/magiclegend/Documents/puma-docker/src/node_modules/@scandipwa/eslint-plugin-scandipwa-guidelines/lib/rules/use-namespace.js:169:31)
    at ExportNamedDeclaration > ClassDeclaration,CallExpression[callee.type='MemberExpression'][callee.object.name!=/.+Dispatcher/]:matches([callee.property.name='then'], [callee.property.name='catch']) > ArrowFunctionExpression,ExportNamedDeclaration > VariableDeclaration > VariableDeclarator > ArrowFunctionExpression (/home/magiclegend/Documents/puma-docker/src/node_modules/@scandipwa/eslint-plugin-scandipwa-guidelines/lib/rules/use-namespace.js:218:31)
    at /home/magiclegend/.nvm/versions/node/v15.5.1/lib/node_modules/eslint/lib/linter/safe-emitter.js:45:58
    at Array.forEach (<anonymous>)
    at Object.emit (/home/magiclegend/.nvm/versions/node/v15.5.1/lib/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (/home/magiclegend/.nvm/versions/node/v15.5.1/lib/node_modules/eslint/lib/linter/node-event-generator.js:256:26)
    at NodeEventGenerator.applySelectors (/home/magiclegend/.nvm/versions/node/v15.5.1/lib/node_modules/eslint/lib/linter/node-event-generator.js:285:22)

When reverting @scandipwa/eslint-plugin-scandipwa-guidelines back to ^1.10 this no longer throws.

ESLint plugin in webpack does not respect workspace's configuration

Describe the bug

If ESLint in package.json is switched off (removed at all) - webpack still throws on ESLint rule violations.

Did you try recovering your dependencies?

This is a fresh CSA installation of 29.03.2021
Ergo, nothing to recover. This should work by default.

Which terms did you search for in User Guide?

Searching for "ESLint" on docs.scandipwa.com gave me a solution - put "ignorePatterns": ["src/**"] inside of ESLint configuration. This is a valid solution, although not intuitive. When I remove ESLint from the configuration at all, I expect it not to be in the application during the compilation, just as it becomes absent in my code editor.

Environment

macOS Big Sur 11.2.3
node 14.16.0
yarn 1.22.10

Steps to reproduce

  1. npx create-scandipwa-app --template blank <name>
  2. Violate some eslint rules of the @scandipwa config. See errors highlighted in your code editor.
  3. Remove the eslint field from the generated package.json file. See no errors that previously have been highlighted.
  4. Launch the project. See compilation errors of following format

image

Expected behavior

ESLint-related compilation errors do not arise when ESLint is switched off for the project.

Actual behavior

ESLint-related compilation errors arise.

Reproducible demo

Fresh CSA installation.

Unexpected code in `plugins` folder

Describe the bug

People sometimes put code into plugin directory, i.e. their components and stuff. We should add warning if the plugin has no default export of object which is a valid plugin. I would process them before appending to the document.

Such case could be found in: jherr/scandipwa-demo-code#1

Non-extractable translations

Following error is displayed upon build:

ERROR!

     Non-extractable translations found in your application!
     Consider refactoring them so that they are translatable.
     See a list of files containing them below:

The list of non-translatable strings is not supplied. @yeegor this happens on latest version!

create scandipwa-app fails

Describe the bug

Every create scandipwa-app fails (yarn, npm). I am running MacOS 12.4 Monterey / Intel Mac with node version v18.7.0. The create magento-app script worked as expected.

Did you try recovering your dependencies?

yes

Which terms did you search for in User Guide?

Unhandled exception

Environment

MacOS 12.4 Monterey / Intel Mac with node version v18.7.0

Steps to reproduce

  1. yarn create scandipwa-app your-app

Expected behavior

setup is successful and scandipwa is installed and configured

Actual behavior

`node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "undefined".] {
code: 'ERR_UNHANDLED_REJECTION'
}

Node.js v18.7.0
error Command failed.
Exit code: 1
Command: /usr/local/bin/create-scandipwa-app`

Imports from "." path break the application

Describe the bug

The import of most components from popular library antd break the application compilation with following error:

/home/scandiweb/Projects/create-scandipwa-app/node_modules/antd/es/date-picker/generatePicker/generateSinglePicker.js
Attempted import error: 'Components' is not exported from '../../../../../runtime-packages/csa-blank/src'.

The file it is referring to, contains following import declaration:

import { getTimeProps, Components } from '.';

If I change it to ./index.js then it works. The question is what is causing the setup to assume that such import . is pointing to ../../../../../runtime-packages/csa-blank/src. The thing is - it is coming such way into the fallback plugin, we do not intercept this request (which is expected).

The resolver's hook resolve arguments request and resolveContext are already containing this value, not the expected ..

Expected behavior

I am, honestly speaking, unsure if this is expected or not. I have not seen the issues like that reported antd library, thus I assume that issue is something to deal with our setup. I was unable to research where does it came from.

not able to configure scandipwa theme for magento website

Describe the bug

I successfully installed pwa app in our magento and able to access with "yarn start". After i build magento theme from "BUILD_MODE=magento yarn build" commend.Now i go to magento admin and set pwa theme for website but not able to configure theme.

after running npm run start command

Failed to compile.

./node_modules/@scandipwa/webpack-i18n-runtime/src/util/localeMap.js
TypeError: Cannot read property 'defaultLocale' of null

ERROR!

 Non-extractable translations found in your application!
 Consider refactoring them so that they are translatable.
 See a list of files containing them below:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.