npm start fails on a fresh project
pjungwir opened this issue · comments
Hello, I thought I'd give Solid a try, but the create script fails for me after running:
nvm use 14
yarn create solid app my-app
cd my-app
yarn install
npm start
I get this error:
paul@tal:~/src/billitate/grid/my-app$ npm start
> my-app@0.1.0 start /home/paul/src/billitate/grid/my-app
> solid-scripts start
internal/modules/cjs/loader.js:818
throw err;
^
Error: Cannot find module 'sanitize.css/page.css'
Require stack:
- /home/paul/src/billitate/grid/my-app/node_modules/postcss-normalize/dist/index.cjs.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
at resolve (/home/paul/src/billitate/grid/my-app/node_modules/postcss-normalize/dist/index.cjs.js:46:46)
at Object.<anonymous> (/home/paul/src/billitate/grid/my-app/node_modules/postcss-normalize/dist/index.cjs.js:22:25)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/home/paul/src/billitate/grid/my-app/node_modules/solid-scripts/config/webpack.config.js:14:26) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/paul/src/billitate/grid/my-app/node_modules/postcss-normalize/dist/index.cjs.js'
]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-app@0.1.0 start: `solid-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-app@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/paul/.npm/_logs/2021-09-21T23_55_22_468Z-debug.log
I also tried with node 12 and npm init solid app my-app
, but all variations gave me the same results.
Alright, I've reproduced. Thanks for reporting. I haven't updated this in months as we've mostly moved to Vite but somehow this has broken in the meanwhile. I will dig in and see what's going on.
Ok, it should be fixed in solid-scripts 0.0.61. Essentially some downstream unlocked(*) dependency of PostCSS had a breaking change. Thanks for bringing this to my attention.
Looks like it works now. Thank you, and thank you for Sollid! I'm excited to try a JS framework with fast performance and small bundle size.
I'll probably give Vite a try soon, but I'm hoping to integrate this into a Rails app, so I expect using webpack will be easier.