The less template has errors on start after clean install #318
Description
Is this a bug report?
Yes.
Can you also reproduce the problem with npm 4.x?
I'm on npm 5.6.0. I'd like to avoid down-grading if possible. If this only works on 4 I'll use something else.
Environment
npm ls react-scripts-ts
(if you haven’t ejected): my-app@0.1.0 C:<path_to_my_app> `-- (empty)node -v
: v8.11.1npm -v
: 5.6.0yarn --version
(if you use Yarn): 1.3.2npm ls react-scripts-ts
(if you haven’t ejected): Again? Same result as The 'eject' script results in an error. #1.
Then, specify:
- Operating system: Windows 10
- Browser and version (if relevant): current Chrome, but not relevant
Steps to Reproduce
- Run "npx create-react-app test --scripts-version=react-scripts-ts-less"
- wait for install to do the things
- Observe success message, follow instructions
- cd to app directory
- Run "yarn start"
- Observe error: "Failed to load tsconfig.json: Missing baseUrl in compilerOptions"
- Add
"baseUrl": "."
tocompilerOptions
section oftsconfig.json
- Run "yarn start"
- Observe error:
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
configuration.module has an unknown property 'preLoaders'. These properties are valid:
object { exprContextCritical?, exprContextRecursive?, exprContextRegExp?, exprContextRequest?, loaders?, noParse?, rules?, unknownContextCritical?, unknownContextRecursive?, unknownContextRegExp?, unknownContextRequest?, unsafeCache?, wrappedContextCritical?, wrappedC
ontextRecursive?, wrappedContextRegExp?, strictExportPresence?, strictThisContextOnImports? }
Options affecting the normal modules (NormalModuleFactory
).
- Stopped messing with this because it shouldn't be this difficult.
Expected Behavior
Run the install, run "yarn start", app starts with no errors. When I run npx create-react-app test --scripts-version=react-scripts-ts
, it works as expected, so I would assume this is an issue with the less template.
Actual Behavior
See Steps to Reproduce
. Specifically steps #6 & #9.
Reproducible Demo
I'm skipping this part at the risk of not being helped. The fact that this won't run out of the gate should be enough of a test. If this is related to the npm version used, I'll just go back to using the non-less template and add less support myself.
Activity
DorianGrey commentedon May 5, 2018
The package react-scripts-ts-less is in no way related to this project. It's owner saidireddy.basireddy has published two packages that seem to be refering to a setup including
less
, however the repository links are simply wrong, since they still point to this repository.I'm not sure who that author is, but he/she/whatever is in no way related to this fork.
I was able to have a glimpse at the package on runkit and figure out what causes the problem you mentioned - see
https://npm.runkit.com/react-scripts-ts-less/config/webpack.config.dev.js in line 133:
preLoaders
is not a validwebpack
configuration anymore, it was removed in v3 in favor of theenforce: 'pre'
configuration option when defining a loader.So it seems that this "project" does not only use (intentionally?) use misleading owner resp. repository links, but also messed up the configuration contents, i.e. invalidating them.
wmonk commentedon May 10, 2018
Going to close due to no feedback. Please reopen if there are any further developments.