Closed nhhockeyplayer closed 3 years ago
optimization: false
just for reference... this is the main error plaguing me on my angular project that has a large sass scaffold underneath. Webpack is nowhere defined anywhere in my project either and no offense I dont want it there anyway.
./node_modules/@angular/compiler-cli/src/ngtsc/file_system/src/node_js_file_system.mjs:10:0-26 - Error: Module not found: Error: Can't resolve 'path' in '/Users/me/new/app/node_modules/@angular/compiler-cli/src/ngtsc/file_system/src'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "path": require.resolve("path-browserify") }'
- install 'path-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "path": false }
I was hoping I could get some questions answered
QUESTION: Is Nrwl/Nx governing THE typescript for any given workspace now? I ask this because I installed the latest Nrwl and generated a new workspace with project and typescript is NOT in package.json yet the workspace builds and typescript is being operated under the hood by Nrwl/Nx. Tis sounds nice and feels right. Not documented though yet.
I ask because of this strange error https://github.com/nrwl/nx/issues/6223
Can someone confirm this as the new spec for generated workspaces and angular projects? I did not install typescript globally nor did I specify it in package.json
It comes bundled now with nrwl/nx ? confirmation requested and use notes Thanks n advance
QUESTION
I nuked all yarn npm caches and any installations under /usr/local/bin and /usr/local/node_modules
reinstalled nrwl/Nx
migrated from 11.6.3 to 12
then I nuked all the caches again
reinstalled to rebuild my new 12 codebase
nx report keeps saying 11.6.3
Can anyone explain why that is? is this a forgotten hardwired string? Or is there a different cache I need to cleanup?
Its not accurate to see things that are not and confusing
> NX Report complete - copy this into the issue template
Node : 14.15.1
OS : darwin x64
yarn : 1.22.10
nx : 11.6.3
QUESTION
does my new angular 12 project NEED anything webpack installed in order to function?
I am relying on the default angular product to process all my sass/scss
FYI
upgraded node 12 to node 16 and no change same error
other angular projects within my workspace build and run fine
only difference is the usage of a large sass scaffold that extends boot strap and forks the sass at the top for either IONIC or MATERIAL for their special theme importing and I use those independently inside a material only feature module with material theme and also for an ionic only feature module with ionic theme but BOTH anchor and import off of my large bootstrap derivative and yes these apps run using both ionic feature modules and material feature modules within the same SPA... material for login and auth... ionic for tabs charts etc... without issues
until angular 12 upgrade
any feedback appreciated
Last QUESTION
all these questions are for 12 angular nrwl nx at once listed above
Do I need to install any sass, node-sass, sass-loader or anything sass ? theres alot of deprecations confusing.
Right now my workspace has nothing sass in package.json
I ONLY want to go with what angular does
does this product angular nrwl nx need anything sass packages to develop and produce SASS for product? or does angular nrwl do it all
Im a vanilla angular nrwl guy and ONLY want to go with what they advocate and spec no jimmyhoakey under the hood.
thanks for all your help and light
nrwl nx is the best
: )
Ok one more
Have any of the 12 released minor versions to npm recentl been recalled and removed
if so why?
webpack, npm, @angular/compiler are the three culprits
enough issues logged already
it may be stable in release or two
but I had to hack my way to a clean build
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
Blocked, cant build... too lengthy of operations to list concisely
the chronology I logged mostly at this ticket
5487
Current Behavior cannot build being blocked something is hooking typescript revision at 4.3.5 when 4.1.6 is successfully installed
Expected Behavior typescript should be gracefully installed and maintained in the npm yarn ecosystem so we can build our nrwl/nx workspace of 200k+ lines of code apps servers
something is preventing typescript from building when its successfully installed both yarn and npm permutations were exercised
Steps to Reproduce attempt upgrade of workspace to angular@12+ performed nx migrate latest too many flanking issues prompted me to roll back though nrwl was fine the angular/webpack issues with 'fs', cb.apply(), jest impact to ecosystem and a slew of other issues too many to log
rollback to @angular/cli@11.6.3 rollback @nrwl@11.6.3
all attempts to install typescript using yarn or npm succeed but the build continuies to fail seeking typescript@4.3.5
something under the hood is anchored to typescript@4.3.5
and I am blocked
lengthy build details are in chronological order at this ticket
5487
and this one
907
and this one has the latest errors
Failure Logs
An error occurred during the build: Error: The Angular Compiler requires TypeScript >=4.0.0 and <4.2.0 but 4.3.5 was found instead. at checkVersion (/Users/meanstack02/new/energy/node_modules/@angular/compiler-cli/src/typescript_support.js:65:19) at Object.verifySupportedTypeScriptVersion (/Users/meanstack02/new/energy/node_modules/@angular/compiler-cli/src/typescript_support.js:70:9) at new NgtscProgram (/Users/meanstack02/new/energy/node_modules/@angular/compiler-cli/src/ngtsc/program.js:44:38) at AngularWebpackPlugin.updateAotProgram (/Users/meanstack02/new/energy/node_modules/@ngtools/webpack/src/ivy/plugin.js:275:32) at /Users/meanstack02/new/energy/node_modules/@ngtools/webpack/src/ivy/plugin.js:164:24 at SyncHook.eval [as call] (eval at create (/Users/meanstack02/new/energy/node_modules/tapable/lib/HookCodeFactory.js:19:10),:9:1)
at SyncHook.lazyCompileHook (/Users/meanstack02/new/energy/node_modules/tapable/lib/Hook.js:154:20)
at Compiler.newCompilation (/Users/meanstack02/new/energy/node_modules/webpack/lib/Compiler.js:630:30)
at /Users/meanstack02/new/energy/node_modules/webpack/lib/Compiler.js:667:29
at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/meanstack02/new/energy/node_modules/tapable/lib/HookCodeFactory.js:33:10), :4:1)
at AsyncSeriesHook.lazyCompileHook (/Users/meanstack02/new/energy/node_modules/tapable/lib/Hook.js:154:20)
at Compiler.compile (/Users/meanstack02/new/energy/node_modules/webpack/lib/Compiler.js:662:28)
at /Users/meanstack02/new/energy/node_modules/webpack/lib/Compiler.js:321:11
at Compiler.readRecords (/Users/meanstack02/new/energy/node_modules/webpack/lib/Compiler.js:529:11)
at /Users/meanstack02/new/energy/node_modules/webpack/lib/Compiler.js:318:10
at eval (eval at create (/Users/meanstack02/new/energy/node_modules/tapable/lib/HookCodeFactory.js:33:10), :9:1)
The Angular Compiler requires TypeScript >=4.0.0 and <4.2.0 but 4.3.5 was found instead.
make: *** [mob] Error 1 meanstack02@admin energy % Environment mac os
node.js v12.22.1
@angular/cli@11.6.3
@nrwl@11.6.3
typescript@4.1.6