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

build error #3204

Closed
2 tasks
alanpurple opened this issue Jul 27, 2023 · 2 comments
Closed
2 tasks

build error #3204

alanpurple opened this issue Jul 27, 2023 · 2 comments

Comments

@alanpurple
Copy link

<--
Please follow the below issue template. Issues not following the issue template will be closed.
Please provide as much detail as possible in as minimal a reproduction as possible. This means no/only one third-party
libraries, no application-specific code, etc. Essentially, we're looking for an ng new project with maybe one
additional file/change. If this is not possible, please look deeper into your issue or post it to StackOverflow
for support. This is a bug/feature tracker, meaning that something is actively missing or broken in Angular Universal.
Anything else does not belong on this forum.

For very common issues when using Angular Universal, please see this doc. This includes
issues for window is not defined and other hiccups when adopting Angular Universal for the first time.
-->

🐞 Bug report

What modules are related to this issue?

  • [ v ] builders
  • common
  • express-engine

Is this a regression?

no

Description

ng universal with

import { Schema, model, Types } from 'mongoose';
import { hash, compare } from 'bcrypt';

cause strange errors

🔬 Minimal Reproduction

in server.ts or related files, insert

import { Schema, model, Types } from 'mongoose';
import { hash, compare } from 'bcrypt';

and then run

ng build
ng run YourProject:server

🔥 Exception or Error

alan@crayserver:~/repo/CrayHome$ ng run CrayHome:server
✔ Server application bundle generation complete.

./node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:40:23-45 - Warning: Module not found: Error: Can't resolve 'npm' in '/home/alan/repo/CrayHome/node_modules/@mapbox/node-pre-gyp/lib/util'

./node_modules/@mapbox/node-pre-gyp/lib/util/versioning.js:15:18-65 - Warning: Critical dependency: the request of a dependency is an expression

./node_modules/bcrypt/bcrypt.js:6:15-36 - Warning: Critical dependency: the request of a dependency is an expression

./node_modules/mongodb/lib/deps.js:28:4-42 - Warning: Module not found: Error: Can't resolve 'kerberos' in '/home/alan/repo/CrayHome/node_modules/mongodb/lib'

./node_modules/mongodb/lib/deps.js:38:4-51 - Warning: Module not found: Error: Can't resolve '@mongodb-js/zstd' in '/home/alan/repo/CrayHome/node_modules/mongodb/lib'

./node_modules/mongodb/lib/deps.js:48:31-71 - Warning: Module not found: Error: Can't resolve '@aws-sdk/credential-providers' in '/home/alan/repo/CrayHome/node_modules/mongodb/lib'

./node_modules/mongodb/lib/deps.js:58:18-35 - Warning: Module not found: Error: Can't resolve 'snappy' in '/home/alan/repo/CrayHome/node_modules/mongodb/lib'

./node_modules/mongodb/lib/deps.js:78:2-32 - Warning: Module not found: Error: Can't resolve 'aws4' in '/home/alan/repo/CrayHome/node_modules/mongodb/lib'

./node_modules/mongodb/lib/utils.js:959:32-87 - Warning: Critical dependency: the request of a dependency is an expression

./node_modules/mongodb/lib/utils.js:968:32-68 - Warning: Module not found: Error: Can't resolve 'mongodb-client-encryption' in '/home/alan/repo/CrayHome/node_modules/mongodb/lib'



./node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js:39:20-42 - Error: Module not found: Error: Can't resolve 'mock-aws-s3' in '/home/alan/repo/CrayHome/node_modules/@mapbox/node-pre-gyp/lib/util'

./node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js:69:14-32 - Error: Module not found: Error: Can't resolve 'aws-sdk' in '/home/alan/repo/CrayHome/node_modules/@mapbox/node-pre-gyp/lib/util'

./node_modules/@mapbox/node-pre-gyp/lib/util/s3_setup.js:100:15-30 - Error: Module not found: Error: Can't resolve 'nock' in '/home/alan/repo/CrayHome/node_modules/@mapbox/node-pre-gyp/lib/util'

./node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html:1:0 - Error: Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> <!doctype html>
| <html>
| <head>

./node_modules/node-gyp/lib/Find-VisualStudio.cs:9:6 - Error: Module parse failed: Unexpected token (9:6)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| // This script needs to be compatible with PowerShell v2 to run on Windows 2008R2 and Windows 7.
|
> using System;
| using System.Text;
| using System.Runtime.InteropServices;

🌍 Your Environment

ubuntu 22.04.2 x64
nodejs 18.17.0
angula cli 16.1.6
npm 9.6.7

@alan-agius4
Copy link
Collaborator

Thanks for reporting this issue. However, you didn't provide sufficient information for us to understand and reproduce the problem. Please check out our submission guidelines to understand why we can't act on issues that are lacking important information.

If the problem persists, please file a new issue and ensure you provide all of the required information when filling out the issue template.

@alan-agius4 alan-agius4 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 17, 2023
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants