npm run setup issue
jjhiggz opened this issue · 7 comments
node version: 16.3.2
to get bug: run "npm run setup"
breaks at "generate:css"
generate:css
> tailwindcss -o ./app/styles/tailwind.css "--minify"
error TS2688: Cannot find type definition file for 'uglify-js'.
The file is in the program because:
Entry point for implicit type library 'uglify-js'
error TS2688: Cannot find type definition file for 'webpack'.
The file is in the program because:
Entry point for implicit type library 'webpack'
error TS2688: Cannot find type definition file for 'webpack-sources'.
The file is in the program because:
Entry point for implicit type library 'webpack-sources'
error TS2688: Cannot find type definition file for 'uglify-js'.
The file is in the program because:
Entry point for implicit type library 'uglify-js'
error TS2688: Cannot find type definition file for 'webpack'.
The file is in the program because:
Entry point for implicit type library 'webpack'
error TS2688: Cannot find type definition file for 'webpack-sources'.
The file is in the program because:
Entry point for implicit type library 'webpack-sources'
error TS2688: Cannot find type definition file for 'uglify-js'.
The file is in the program because:
Entry point for implicit type library 'uglify-js'
error TS2688: Cannot find type definition file for 'webpack'.
The file is in the program because:
Entry point for implicit type library 'webpack'
error TS2688: Cannot find type definition file for 'webpack-sources'.
The file is in the program because:
Entry point for implicit type library 'webpack-sources'
Done in 489ms.
🏎 npm run lint in ./exercise/02-optimistic-ui
error TS2688: Cannot find type definition file for 'uglify-js'.
The file is in the program because:
Entry point for implicit type library 'uglify-js'
error TS2688: Cannot find type definition file for 'webpack'.
The file is in the program because:
Entry point for implicit type library 'webpack'
error TS2688: Cannot find type definition file for 'webpack-sources'.
The file is in the program because:
Entry point for implicit type library 'webpack-sources'
error TS2688: Cannot find type definition file for 'uglify-js'.
The file is in the program because:
Entry point for implicit type library 'uglify-js'
error TS2688: Cannot find type definition file for 'webpack'.
The file is in the program because:
Entry point for implicit type library 'webpack'
error TS2688: Cannot find type definition file for 'webpack-sources'.
The file is in the program because:
Entry point for implicit type library 'webpack-sources'
> build:remix
> remix build
error TS2688: Cannot find type definition file for 'uglify-js'.
The file is in the program because:
Entry point for implicit type library 'uglify-js'
error TS2688: Cannot find type definition file for 'webpack'.
The file is in the program because:
Entry point for implicit type library 'webpack'
error TS2688: Cannot find type definition file for 'webpack-sources'.
The file is in the program because:
Entry point for implicit type library 'webpack-sources'
> lint
> eslint --cache --cache-location ./.cache/eslint .
error TS2688: Cannot find type definition file for 'uglify-js'.
The file is in the program because:
Entry point for implicit type library 'uglify-js'
error TS2688: Cannot find type definition file for 'webpack'.
The file is in the program because:
Entry point for implicit type library 'webpack'
error TS2688: Cannot find type definition file for 'webpack-sources'.
The file is in the program because:
Entry point for implicit type library 'webpack-sources'
error TS2688: Cannot find type definition file for 'uglify-js'.
The file is in the program because:
Entry point for implicit type library 'uglify-js'
error TS2688: Cannot find type definition file for 'webpack'.
The file is in the program because:
Entry point for implicit type library 'webpack'
error TS2688: Cannot find type definition file for 'webpack-sources'.
The file is in the program because:
Entry point for implicit type library 'webpack-sources'
error TS2688: Cannot find type definition file for 'uglify-js'.
The file is in the program because:
Entry point for implicit type library 'uglify-js'
error TS2688: Cannot find type definition file for 'webpack'.
The file is in the program because:
Entry point for implicit type library 'webpack'
error TS2688: Cannot find type definition file for 'webpack-sources'.
The file is in the program because:
Entry point for implicit type library 'webpack-sources'
error TS2688: Cannot find type definition file for 'uglify-js'.
The file is in the program because:
Entry point for implicit type library 'uglify-js'
error TS2688: Cannot find type definition file for 'webpack'.
The file is in the program because:
Entry point for implicit type library 'webpack'
error TS2688: Cannot find type definition file for 'webpack-sources'.
The file is in the program because:
Entry point for implicit type library 'webpack-sources'
error TS2688: Cannot find type definition file for 'uglify-js'.
The file is in the program because:
Entry point for implicit type library 'uglify-js'
error TS2688: Cannot find type definition file for 'webpack'.
The file is in the program because:
Entry point for implicit type library 'webpack'
error TS2688: Cannot find type definition file for 'webpack-sources'.
The file is in the program because:
Entry point for implicit type library 'webpack-sources'
error TS2688: Cannot find type definition file for 'uglify-js'.
The file is in the program because:
Entry point for implicit type library 'uglify-js'
error TS2688: Cannot find type definition file for 'webpack'.
The file is in the program because:
Entry point for implicit type library 'webpack'
error TS2688: Cannot find type definition file for 'webpack-sources'.
The file is in the program because:
Entry point for implicit type library 'webpack-sources'
error TS2688: Cannot find type definition file for 'uglify-js'.
The file is in the program because:
Entry point for implicit type library 'uglify-js'
error TS2688: Cannot find type definition file for 'webpack'.
The file is in the program because:
Entry point for implicit type library 'webpack'
error TS2688: Cannot find type definition file for 'webpack-sources'.
The file is in the program because:
Entry point for implicit type library 'webpack-sources'
error TS2688: Cannot find type definition file for 'uglify-js'.
The file is in the program because:
Entry point for implicit type library 'uglify-js'
error TS2688: Cannot find type definition file for 'webpack'.
The file is in the program because:
Entry point for implicit type library 'webpack'
error TS2688: Cannot find type definition file for 'webpack-sources'.
The file is in the program because:
Entry point for implicit type library 'webpack-sources'
error TS2688: Cannot find type definition file for 'uglify-js'.
The file is in the program because:
Entry point for implicit type library 'uglify-js'
error TS2688: Cannot find type definition file for 'webpack'.
The file is in the program because:
Entry point for implicit type library 'webpack'
error TS2688: Cannot find type definition file for 'webpack-sources'.
The file is in the program because:
Entry point for implicit type library 'webpack-sources'
error TS2688: Cannot find type definition file for 'uglify-js'.
The file is in the program because:
Entry point for implicit type library 'uglify-js'
error TS2688: Cannot find type definition file for 'webpack'.
The file is in the program because:
Entry point for implicit type library 'webpack'
error TS2688: Cannot find type definition file for 'webpack-sources'.
The file is in the program because:
Entry point for implicit type library 'webpack-sources'
error TS2688: Cannot find type definition file for 'uglify-js'.
The file is in the program because:
Entry point for implicit type library 'uglify-js'
error TS2688: Cannot find type definition file for 'webpack'.
The file is in the program because:
Entry point for implicit type library 'webpack'
error TS2688: Cannot find type definition file for 'webpack-sources'.
The file is in the program because:
Entry point for implicit type library 'webpack-sources'
Building Remix app in production mode...
error TS2688: Cannot find type definition file for 'uglify-js'.
The file is in the program because:
Entry point for implicit type library 'uglify-js'
error TS2688: Cannot find type definition file for 'webpack'.
The file is in the program because:
Entry point for implicit type library 'webpack'
error TS2688: Cannot find type definition file for 'webpack-sources'.
The file is in the program because:
Entry point for implicit type library 'webpack-sources'
Found 54 errors.
Huh. This doesn't make sense because we don't use webpack in this project 🤔
@kentcdodds yeah I'm not sure why that's happening. I should probably clarify, for me it happens at the end of npm run setup
when I run it from the root, but it runs far enough through the command before breaking where can still run the examples and do the work after the command exits with an error.
I'm afraid I have no idea what's up. I'm guessing there's something wrong with your machine. Sorry :(
No worries I will look into it and see if I can figure out the problem. Fortunately I can still run through these exercises.
For anybody else encountering this issue, I solved it by going to the main package.json and adding these @types
into the dev dependencies
"devDependencies": {
"@types/source-map": "^0.5.0"
"@types/uglify-js": "^2.6.28",
"@types/webpack": "^5.28.0",
"@types/webpack-sources": "^3.2.0",
"glob": "^8.0.3",
"npm-run-all": "^4.1.5",
"typescript": "^4.6.4"
}
@kentcdodds would it be worth adding this to the repo in case other people are having this problem as well?
Like I said, I'm pretty sure this is an issue on your machine, unrelated to the project. I don't think anyone else will experience this problem.
Thanks for sharing your solution though!