Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fresh Angular Install With Universal Not Working src/@nguniversal/module-map-ngfactory-loader.ts #738

Open
tmk1991 opened this issue Dec 4, 2019 · 3 comments
Labels
comp: universal Universal Package P1: important It is required to ensure proper functionality type: bug Issues that break the functionality

Comments

@tmk1991
Copy link

tmk1991 commented Dec 4, 2019

I'm submitting a...


[X] Bug report  
[ ] Feature request
[ ] Documentation issue or request

In package


[ ] @ng-toolkit/init
[ ] @ng-toolkit/serverless
[X] @ng-toolkit/universal
[ ] @ng-toolkit/pwa
[ ] @ng-toolkit/firebug

Current behavior

On fresh install getting error

Error: ENOENT: no such file or directory, open 'src/@nguniversal/module-map-ngfactory-loader.ts'
    at Object.openSync (fs.js:443:3)
    at Object.readFileSync (fs.js:343:35)
    at Module.<anonymous> (/Users/user/workspace/some-app/dist/prerender.js:2846:29)
    at __webpack_require__ (/Users/user/workspace/some-app/dist/prerender.js:21:30)
    at /Users/user/workspace/some-app/dist/prerender.js:85:18
    at Object.<anonymous> (/Users/user/workspace/some-app/dist/prerender.js:88:10)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)

Expected behavior

Should be able to run pre-render on vanilla install

Minimal reproduction of the problem with instructions

ng new some-app
cd some-app`
ng add @ng-toolkit/universal
npm run build:prerender

Example repository

{
  "name": "some-app",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "compile:server": "webpack --config webpack.server.config.js --progress --colors",
    "serve:ssr": "node local.js",
    "build:ssr": "npm run build:client-and-server-bundles && npm run compile:server",
    "build:client-and-server-bundles": "ng build --prod && ng run lyf-site:server:production --bundleDependencies all",
    "server": "node local.js",
    "build:prod": "npm run build:ssr",
    "serve:prerender": "node static.js",
    "build:prerender": "npm run build:prod && node dist/prerender.js"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "~8.2.9",
    "@angular/common": "~8.2.9",
    "@angular/compiler": "~8.2.9",
    "@angular/core": "~8.2.9",
    "@angular/forms": "~8.2.9",
    "@angular/platform-browser": "~8.2.9",
    "@angular/platform-browser-dynamic": "~8.2.9",
    "@angular/platform-server": "~8.2.9",
    "@angular/router": "~8.2.9",
    "@ng-toolkit/universal": "^8.0.3",
    "@nguniversal/express-engine": "8.1.1",
    "@nguniversal/module-map-ngfactory-loader": "8.1.1",
    "express": "^4.15.2",
    "rxjs": "~6.4.0",
    "tslib": "^1.10.0",
    "zone.js": "~0.9.1",
    "@nguniversal/common": "8.1.0",
    "domino": "^2.1.3"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.803.9",
    "@angular/cli": "~8.3.9",
    "@angular/compiler-cli": "~8.2.9",
    "@angular/language-service": "~8.2.9",
    "@types/node": "~8.9.4",
    "@types/jasmine": "~3.3.8",
    "@types/jasminewd2": "~2.0.3",
    "codelyzer": "^5.0.0",
    "jasmine-core": "~3.4.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~4.1.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~2.0.1",
    "karma-jasmine-html-reporter": "^1.4.0",
    "protractor": "~5.4.0",
    "ts-loader": "^5.2.0",
    "ts-node": "~7.0.0",
    "tslint": "~5.15.0",
    "typescript": "~3.5.3",
    "webpack-cli": "^3.1.0"
  }
}

Environment

See above package.json

@0xstupig
Copy link

0xstupig commented Dec 6, 2019

I've got this issue too. Please fix.

@michaelbaer
Copy link

Me too. Please fix.

@KingDarBoja KingDarBoja added comp: universal Universal Package P1: important It is required to ensure proper functionality type: bug Issues that break the functionality labels Dec 31, 2019
@KingDarBoja
Copy link
Collaborator

I stepped into that bug while fixing other bugs. This should be fixed in the upcoming release as seen on #745,

By the way, Happy New Year 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: universal Universal Package P1: important It is required to ensure proper functionality type: bug Issues that break the functionality
Projects
None yet
Development

No branches or pull requests

4 participants