I just change my computer from windows to mac and tried to start my server app that based on
postgresql and got this error: Error: Cannot find module '../driver/postgres/PostgresDriver' .
i installed typeorm and pg and installed postgres and yet i get this message.
hope somebody can help me.
Full errors:
Error: Cannot find module '../driver/postgres/PostgresDriver'
Require stack:
- /Users/ohadsahar/Documents/Development/my_app/server/node_modules/typeorm/schema-builder/RdbmsSchemaBuilder.js
- /Users/ohadsahar/Documents/Development/my_app/server/node_modules/typeorm/driver/sqlserver/SqlServerDriver.js
- /Users/ohadsahar/Documents/Development/my_app/server/node_modules/typeorm/migration/MigrationExecutor.js
- /Users/ohadsahar/Documents/Development/my_app/server/node_modules/typeorm/connection/Connection.js
- /Users/ohadsahar/Documents/Development/my_app/server/node_modules/typeorm/connection/ConnectionManager.js
- /Users/ohadsahar/Documents/Development/my_app/server/node_modules/typeorm/index.js
- /Users/ohadsahar/Documents/Development/my_app/server/src/api/models/user.model.ts
- /Users/ohadsahar/Documents/Development/my_app/server/src/api/services/auth.service.ts
- /Users/ohadsahar/Documents/Development/my_app/server/src/api/controllers/auth.controller.ts
- /Users/ohadsahar/Documents/Development/my_app/server/src/api/routes/auth.routes.ts
- /Users/ohadsahar/Documents/Development/my_app/server/src/api/routes/index.ts
- /Users/ohadsahar/Documents/Development/my_app/server/src/app.ts
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
at Function.Module._load (internal/modules/cjs/loader.js:842:27)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/Users/ohadsahar/Documents/Development/my_app/server/src/schema-builder/RdbmsSchemaBuilder.ts:17:1)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
Waiting for the debugger to disconnect...
This is all the errors i get
Package.json:
{
"name": "my_app_server",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "jest",
"build": "npm run build-ts && npm run copy-static-assets",
"start": "node dist/app.js",
"build-ts": "tsc",
"watch-ts": "npm run copy-static-assets && tsc -w",
"watch-node": "nodemon",
"watch": "concurrently -k -p \"[{name}]\" -n \"TypeScript,Node\" -c \"yellow.bold,cyan.bold,green.bold\" \"npm run watch-ts\" \"npm run watch-node\"",
"run-ts": "ts-node src/app.ts",
"copy-static-assets": "ts-node copyStaticAssets.ts",
"start:idea": "ts-node $NODE_DEBUG_OPTION --ignore false src/app.ts --env=dev",
"migration:generate": "ts-node ./node_modules/typeorm/cli migration:generate -n migration -d src/migration -f ./src/config/orm.config.ts",
"migration:run": "ts-node ./node_modules/typeorm/cli migration:run -f ./src/config/orm.config.ts"
},
"author": "",
"license": "ISC",
"dependencies": {
"#sendgrid/mail": "^7.2.0",
"#types/bcryptjs": "^2.4.2",
"#types/node": "12.11.7",
"#types/passport": "1.0.0",
"aws-sdk": "2.463.0",
"bcrypt-nodejs": "0.0.3",
"bcryptjs": "^2.4.3",
"body-parser": "^1.18.3",
"chance": "^1.1.4",
"class-transformer": "^0.2.3",
"class-validator": "^0.11.0",
"concurrently": "^4.1.0",
"cors": "^2.8.5",
"del": "^4.1.1",
"dotenv": "^8.0.0",
"express": "^4.16.4",
"helmet": "^3.21.2",
"http-status-codes": "^1.3.0",
"lodash": "^4.17.15",
"minimist": "^1.2.0",
"moment": "^2.23.0",
"morgan": "^1.9.1",
"multer": "^1.4.2",
"mysql": "^2.16.0",
"nodemailer": "^5.0.0",
"nodemailer-sendgrid-transport": "^0.2.0",
"passport": "^0.4.0",
"passport-jwt": "^4.0.0",
"pg": "^8.0.3",
"plivo": "^4.6.0",
"reflect-metadata": "^0.1.12",
"shelljs": "^0.8.3",
"typedi": "^0.8.0",
"typeorm": "0.2.19",
"typeorm-typedi-extensions": "^0.2.1",
"winston": "^3.1.0"
},
"devDependencies": {
"#types/bcrypt-nodejs": "0.0.30",
"#types/bluebird": "^3.5.25",
"#types/cors": "2.8.6",
"#types/csv-parse": "^1.1.11",
"#types/email-templates": "^3.5.0",
"#types/express": "4.16.0",
"#types/express-serve-static-core": "4.16.0",
"#types/helmet": "0.0.42",
"#types/lodash": "^4.14.119",
"#types/minimist": "^1.2.0",
"#types/moment": "^2.13.0",
"#types/moment-timezone": "^0.5.12",
"#types/morgan": "^1.7.35",
"#types/multer": "^1.4.3",
"#types/nodemailer": "^4.6.5",
"#types/papaparse": "^4.5.7",
"#types/passport-jwt": "^3.0.1",
"#types/pug": "^2.0.4",
"#types/shelljs": "^0.8.1",
"#types/winston": "^2.4.4",
"ts-node": "^7.0.1",
"tsconfig-paths": "^3.8.0",
"typescript": "^3.7.5"
}
}
Related
I want to build quasar project with command quasar build. The compile progress goes to 100% but I get the error after build:
App · ⚠️ 1 error encountered:
./node_modules/htmlparser2/lib/esm/index.js 59:9
Module parse failed: Unexpected token (59:9)
File was processed with these loaders:
* ./node_modules/#quasar/app/lib/webpack/loader.transform-quasar-imports.js
You may need an additional loader to handle the result of these loaders.
| return getFeed(parseDOM(feed, options));
| }
> export * as DomUtils from "domutils";
| // Old name for DomHandler
| export { DomHandler as DefaultHandler };
# ./node_modules/sanitize-html/index.js 1:19-41
# ./node_modules/vue-sanitize/dist/vue-sanitize.js
# ./src/boot/sanitize.ts
# ./.quasar/client-entry.js
# multi ./.quasar/client-entry.js
App · ⚠️ [FAIL] Build failed with 1 error. Check log above.
This is my package.json:
{
"name": "rfasdef",
"version": "0.0.1",
"description": "",
"productName": "",
"cordovaId": "",
"capacitorId": "",
"author": "",
"private": true,
"scripts": {
"lint": "eslint --ext .js,.ts,.vue --ignore-path .gitignore ./"
},
"dependencies": {
"#quasar/extras": "^1.0.0",
"#types/file-saver": "^2.0.5",
"#types/jwt-decode": "^3.1.0",
"axios": "^0.18.1",
"crypto-js": "^4.0.0",
"echarts": "^4.6.0",
"file-saver": "^2.0.5",
"formik": "^2.2.9",
"jalaali-js": "^1.2.3",
"jwt-decode": "^3.1.2",
"lodash": "^4.17.21",
"moment": "^2.29.4",
"moment-duration-format": "^2.3.2",
"moment-jalaali": "^0.9.6",
"num2persian": "^3.2.2",
"persianjs": "^0.4.0",
"qjdatetime": "^1.1.0",
"quasar": "^1.9.5",
"sass": "^1.45.0",
"vue-echarts": "^5.0.0-beta.0",
"vue-i18n": "^8.0.0",
"vue-persian-datetime-picker": "^2.10.1",
"vue-sanitize": "^0.2.0"
},
"devDependencies": {
"#quasar/app": "^1.6.2",
"#quasar/quasar-app-extension-dotenv": "^1.0.1",
"#types/lodash": "^4.14.150",
"#types/moment-jalaali": "^0.7.5",
"#types/node": "^10.17.15",
"#typescript-eslint/eslint-plugin": "^2.17.0",
"#typescript-eslint/parser": "^2.17.0",
"babel-eslint": "^10.0.1",
"eslint": "^6.8.0",
"eslint-config-standard": "^14.1.0",
"eslint-loader": "^3.0.3",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^6.1.2",
"vue-property-decorator": "^8.3.0",
"vuex-class": "^0.3.2",
"vuex-module-decorators": "^0.11.0"
},
"engines": {
"node": ">= 10.18.1",
"npm": ">= 6.13.4",
"yarn": ">= 1.21.1"
},
"browserslist": [
"last 1 version, not dead, ie >= 11"
],
"resolutions": {
"#babel/parser": "7.7.5"
}
}
It was working yesterday but today it's not working!
I tried installing packages with both yarn and npm. But its not working.
Try this:
Deleting package-lock.json and folder node_modules
then run npm install or yarn install
then run quasar build
I am working on a next js project and while refreshing the page i am getting this error. But when i start from beginning that is signing in and then visiting other pages then this error wont appear. But if there is any error in fetching data from api then it appears.
Here's the complete log:
Uncaught Error: Cannot find module 'C:\Users\abhit\Desktop\Minimal_JavaScript_v3.0.0\Minimal_JavaScript_v3.0.0\modified\node_modules\#hookform\resolvers\yup\dist\yup'
at createEsmNotFoundErr (node:internal/modules/cjs/loader:960:15)
at finalizeEsmResolution (node:internal/modules/cjs/loader:953:15)
at resolveExports (node:internal/modules/cjs/loader:483:14)
at Module._findPath (node:internal/modules/cjs/loader:523:31)
at Module._resolveFilename (node:internal/modules/cjs/loader:925:27)
at mod._resolveFilename (file://C:\Users\abhit\Desktop\Minimal_JavaScript_v3.0.0\Minimal_JavaScript_v3.0.0\modified\node_modules\next\dist\build\webpack\require-hook.js:27:32)
at mod._resolveFilename (file://C:\Users\abhit\Desktop\Minimal_JavaScript_v3.0.0\Minimal_JavaScript_v3.0.0\modified\node_modules\next\dist\build\webpack\require-hook.js:27:32)
at mod._resolveFilename (file://C:\Users\abhit\Desktop\Minimal_JavaScript_v3.0.0\Minimal_JavaScript_v3.0.0\modified\node_modules\next\dist\build\webpack\require-hook.js:27:32)
at Module._load (node:internal/modules/cjs/loader:780:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
getServerError # client.js?4d30:7
eval # index.js?46cb:709
setTimeout (async)
Here is my package.json:
{
"name": "apsit-community",
"author": "apsit",
"version": "1.0.0",
"description": "Platform build by students for the students.",
"private": true,
"scripts": {
"lint": "next lint",
"lint:es": "eslint --ext .js,.jsx .",
"lint:fix": "eslint --fix --ext .js,.jsx .",
"dev": "next dev -p 3031",
"build": "next build",
"start": "next start"
},
"dependencies": {
"#auth0/auth0-spa-js": "^1.19.3",
"#emotion/cache": "^11.7.1",
"#emotion/react": "^11.7.1",
"#emotion/server": "^11.4.0",
"#emotion/styled": "^11.6.0",
"#fullcalendar/common": "^5.10.1",
"#fullcalendar/daygrid": "^5.10.1",
"#fullcalendar/interaction": "^5.10.1",
"#fullcalendar/list": "^5.10.1",
"#fullcalendar/react": "^5.10.1",
"#fullcalendar/timegrid": "^5.10.1",
"#fullcalendar/timeline": "^5.10.1",
"#hookform/resolvers": "^2.9.7",
"#iconify/react": "^3.1.0",
"#mui/lab": "^5.0.0-alpha.60",
"#mui/material": "^5.2.4",
"#mui/x-data-grid": "^5.2.1",
"#react-pdf/renderer": "^2.0.21",
"#reduxjs/toolkit": "^1.7.1",
"#turf/bbox": "^6.5.0",
"amazon-cognito-identity-js": "^5.2.3",
"apexcharts": "^3.32.0",
"autosuggest-highlight": "^3.2.0",
"axios": "^0.24.0",
"change-case": "^4.1.2",
"cookie": "^0.4.1",
"d3-array": "^3.1.1",
"d3-scale": "^4.0.2",
"date-fns": "^2.27.0",
"deck.gl": "^8.6.5",
"emoji-mart": "^3.0.0",
"firebase": "^9.6.1",
"framer-motion": "^5.5.5",
"geojson": "^0.5.0",
"highlight.js": "^11.3.1",
"i18next": "^21.6.3",
"i18next-browser-languagedetector": "^6.1.2",
"immutable": "^4.0.0",
"js-cookie": "^3.0.1",
"jsonwebtoken": "^8.5.1",
"jwt-decode": "^3.1.2",
"lodash": "^4.17.19",
"mapbox-gl": "^2.6.1",
"next": "^12.0.7",
"next-transpile-modules": "^9.0.0",
"notistack": "^2.0.3",
"nprogress": "^0.2.0",
"numeral": "^2.0.6",
"prop-types": "^15.8.1",
"react": "^17.0.1",
"react-apexcharts": "^1.3.9",
"react-beautiful-dnd": "^13.1.0",
"react-copy-to-clipboard": "^5.0.4",
"react-dom": "^17.0.2",
"react-dropzone": "^11.4.2",
"react-hook-form": "^7.22.2",
"react-i18next": "^11.15.1",
"react-image-lightbox": "^5.1.4",
"react-lazy-load-image-component": "^1.5.1",
"react-map-gl": "^6.1.18",
"react-markdown": "^7.1.1",
"react-quill": "^2.0.0",
"react-redux": "^7.2.6",
"react-slick": "^0.28.0",
"redux": "^4.1.2",
"redux-persist": "^6.0.0",
"rehype-raw": "^6.1.0",
"simplebar": "^5.3.6",
"simplebar-react": "^2.3.6",
"slick-carousel": "^1.8.1",
"stylis": "^4.0.13",
"stylis-plugin-rtl": "^2.1.1",
"worker-loader": "^3.0.8",
"yup": "^0.32.11"
},
"devDependencies": {
"#next/eslint-plugin-next": "^12.0.7",
"eslint": "^7.32.0",
"eslint-config-next": "^12.0.7",
"eslint-config-prettier": "^8.3.0",
"prettier": "2.5.1",
"typescript": "^4.4.4"
}
}
It's because, you don't have "react-hook-form" So, Try the following:
npm install react-hook-form #hookform/resolvers yup
I've been using fontawesome with no issues for months. Today, I started seeing this error whenever I tried to push my app to production.
error An unexpected error occurred: "https://npm.fontawesome.com/#fortawesome/fontawesome-pro/-/6.1.1/fontawesome-pro-6.1.1.tgz: Request failed \"401 Unauthorized\"".
I've tried running yarn install, removing node_modules, removing yarn.lock, etc. and I still get 401 unauthorized. I even uninstalled and reinstalled all fontawesome packages.
I'm using Yarn, not NPM, so not sure if that has something to do with it. I do have a .npmrc file set up and that looks like:
// .npmrc
#fortawesome:registry=https://npm.fontawesome.com/
//npm.fontawesome.com/:_authToken="my-token"
I also have a .yarnrc.yml file
// .yarnrc.yml
npmScopes:
fortawesome:
npmRegistryServer: "https://npm.fontawesome.com/"
npmAlwaysAuth: true
npmAuthToken: "my-token"
Here's my package.json:
{
"name": "br-client",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"test": "jest",
"storybook": "start-storybook -p 6006 --quiet",
"build-storybook": "build-storybook",
"storybook:clean": "rm -rf node_modules/.cache/storybook",
"json-server": "json-server -p 5000 --host 0.0.0.0 --watch db.json",
"compile": "tsc --noEmit"
},
"dependencies": {
"#auth0/auth0-react": "^1.3.0",
"#fortawesome/fontawesome-common-types": "^6.1.1",
"#fortawesome/fontawesome-pro": "^6.1.1",
"#fortawesome/fontawesome-svg-core": "^6.1.1",
"#fortawesome/free-brands-svg-icons": "^6.1.1",
"#fortawesome/free-regular-svg-icons": "^6.1.1",
"#fortawesome/free-solid-svg-icons": "^6.1.1",
"#fortawesome/react-fontawesome": "^0.1.18",
"#joeattardi/emoji-button": "^4.6.0",
"#stripe/react-stripe-js": "^1.4.1",
"#stripe/stripe-js": "^1.15.2",
"#tailwindcss/forms": "^0.4.0",
"#typeform/embed": "^1.2.0",
"#types/auth0-js": "^9.14.2",
"#types/lodash-es": "^4.17.4",
"#types/react-dom": "^17.0.0",
"#types/react-modal": "^3.12.0",
"algoliasearch": "^4.9.3",
"auth0-js": "^9.19.0",
"axios": "^0.21.1",
"classnames": "^2.2.6",
"date-fns": "^2.16.1",
"firebase": "^8.2.4",
"lodash-es": "^4.17.20",
"next": "10.0.5",
"next-transpile-modules": "^6.0.0",
"qs": "^6.9.6",
"rc-slider": "^9.7.1",
"rc-switch": "^3.2.2",
"react": "17.0.1",
"react-datepicker": "^3.4.1",
"react-dom": "17.0.1",
"react-easy-crop": "^3.3.2",
"react-functional-select": "^2.9.5",
"react-ga": "^3.3.0",
"react-helmet": "^6.1.0",
"react-hotjar": "^5.0.0",
"react-modal": "^3.12.1",
"react-player": "^2.9.0",
"react-query": "^3.5.16",
"react-typeform-embed": "^0.2.1",
"react-window": "^1.8.6",
"recoil": "^0.1.2",
"sharp": "^0.30.3",
"styled-components": "^5.2.1",
"styled-jsx-plugin-postcss": "^4.0.0"
},
"devDependencies": {
"#babel/core": "^7.12.10",
"#next/bundle-analyzer": "^10.0.5",
"#storybook/addon-actions": "^6.1.18",
"#storybook/addon-essentials": "^6.1.18",
"#storybook/addon-links": "^6.1.18",
"#storybook/react": "^6.1.18",
"#tailwindcss/postcss7-compat": "^2.0.3",
"#testing-library/jest-dom": "^5.11.8",
"#testing-library/react": "^11.2.3",
"#types/node": "^14.14.20",
"#types/react": "^17.0.0",
"#types/react-datepicker": "^3.1.7",
"autoprefixer": "^10.4.4",
"babel-jest": "^26.6.3",
"babel-loader": "^8.2.2",
"husky": "^5.1.3",
"import-sort-style-module": "^6.0.0",
"jest": "^26.6.3",
"json-server": "^0.16.3",
"lint-staged": ">=10",
"postcss": "^8.4.12",
"prettier": "^2.2.1",
"prettier-plugin-import-sort": "^0.0.6",
"tailwindcss": "^3.0.23",
"tsconfig-paths-webpack-plugin": "^3.3.0",
"typescript": "^4.1.3"
},
"importSort": {
".js, .jsx, .ts, .tsx": {
"style": "module",
"parser": "typescript"
}
},
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"pre-push": "tsc --noEmit"
}
},
"lint-staged": {
"*.{js,jsx,ts,tsx,css,scss,md,json}": "prettier --write"
}
}
Answering my own question. The issue ended up being with my dockerfile. According to the fontawesome installation instructions you need to run these two commands in your terminal:
npm config set "#fortawesome:registry" https://npm.fontawesome.com/
npm config set "//npm.fontawesome.com/:_authToken" "your token here"
But, if you use docker you'll need to add these two commands to your dockerfile:
RUN npm config set "#fortawesome:registry" https://npm.fontawesome.com/
RUN npm config set "//npm.fontawesome.com/:_authToken" "your token here"
That way, the config gets set when you deploy.
So my whole dockerfile now looks like...
FROM node:14-alpine
WORKDIR /usr/src/app
RUN npm config set "#fortawesome:registry" https://npm.fontawesome.com/
RUN npm config set "//npm.fontawesome.com/:_authToken" "my token"
COPY package*.json ./
COPY yarn.lock ./
RUN yarn install
COPY . .
RUN yarn build
EXPOSE 3000
CMD [ "yarn", "start" ]
I installed the verdaccio in windows 8 os and It's working well.
my problem started when I tried to update the npm-cache.
after the update version of package.json file, I use the npm install --registry="http://localhost:4873 command for update npm-cache.
when I exec above command, it's start to install the packages, But after a while, I encountered with errors:
or
when I add that package (e.g request#^2.88.0) in package.json=>dependencies, It's installed but I encountered with next error package and loop ...
I clean the catch with npm cache clean --force. and remove the C:\Users\xxx\AppData\Roaming\npm-cache folder physicsally and reinstall. But to no avail.
I use the verdaccio#^4.4.0.
npm version is 6.3.14.
node version is 12.14.0.
how to fix this problem?
UPDATE:
I did the following:
update veraccio to version 4.4.2.
set registry config npm config set registry http://registry.npmjs.com/.
clean cache with this command npm cache clean --force.
update npm globally with npm i -g.
set registry config npm config set registry http://localhost:4873/.
and run npm i.
much better and resolve above errors. but I have new error:
config.yaml:
storage: ./storage
plugins: ./plugins
web:
title: Verdaccio
auth:
htpasswd:
file: ./htpasswd
uplinks:
#npmjs:
#url: https://registry.npmjs.org/
packages: '#*/*':
access: $all
publish: $all
unpublish: $all
#proxy: npmjs
'**':
access: $all
publish: $all
unpublish: $all
#proxy: npmjs
server: keepAliveTimeout: 60
middlewares: audit:
enabled: true
logs:
- { type: stdout, format: pretty, level: http }
package.json:
{
"name": "AngularModules",
"version": "2.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "node package-builder",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"#agm/core": "^1.1.0",
"#angular/animations": "^6.1.4",
"#angular/cdk": "^7.3.7",
"#angular/common": "^6.1.10",
"#angular/compiler": "^6.1.10",
"#angular/core": "^6.1.10",
"#angular/flex-layout": "^6.0.0-beta.17",
"#angular/forms": "^6.1.10",
"#angular/http": "^6.1.10",
"#angular/material": "^6.4.7",
"#angular/platform-browser": "^6.1.10",
"#angular/platform-browser-dynamic": "^6.1.10",
"#angular/router": "^6.1.10",
"#aspnet/signalr": "^1.1.4",
"#asymmetrik/ngx-leaflet": "^4.0.0",
"#ngu/carousel": "^1.5.5",
"#ngx-loading-bar/core": "2.1.2",
"#ngx-loading-bar/router": "2.1.2",
"#ngx-prism/core": "^2.0.1",
"#ngx-translate/core": "^10.0.2",
"#ngx-translate/http-loader": "^3.0.1",
"#swimlane/ngx-datatable": "^13.1.0",
"#types/prismjs": "^1.16.0",
"angular-calendar": "^0.25.2",
"angular-material-fileupload": "0.0.11",
"angular-tree-component": "^7.2.1",
"buffer": "^5.4.3",
"chart.js": "2.7.2",
"core-js": "^2.6.11",
"d3": "^5.15.0",
"devextreme": "18.1.5",
"devextreme-angular": "18.1.5",
"dragula": "3.7.2",
"events": "^3.1.0",
"hammerjs": "2.0.8",
"intl": "1.2.5",
"jszip": "3.1.5",
"leaflet": "^1.6.0",
"lodash-es": "^4.17.15",
"material-design-icons": "^3.0.1",
"moment": "^2.24.0",
"ncp": "^2.0.0",
"ng-animate": "^0.3.4",
"ng2-charts": "1.6.0",
"ng2-dragula": "^2.1.1",
"ng2-file-upload": "1.3.0",
"ng2-jalali-date-picker": "^2.2.7",
"ng2-pdfjs-viewer": "^0.2.29",
"ng2-validation": "4.2.0",
"ng6-breadcrumbs": "1.0.7",
"ngx-export-as": "^1.4.0",
"ngx-perfect-scrollbar": "^6.3.1",
"ngx-quill": "^3.6.0",
"primeicons": "^1.0.0",
"primeng": "^6.1.7",
"print-js": "^1.0.63",
"prismjs": "^1.19.0",
"rxjs": "^6.2.2",
"rxjs-compat": "^6.2.2",
"screenfull": "3.3.2",
"stream": "0.0.2",
"timers": "^0.1.1",
"webpack-bundle-analyzer": "^2.13.1",
"zone.js": "^0.8.29"
},
"devDependencies": {
"#angular-devkit/build-angular": "^0.7.5",
"#angular-devkit/build-ng-packagr": "^0.7.5",
"#angular/cli": "^6.2.9",
"#angular/compiler-cli": "^6.1.10",
"#angular/language-service": "^6.1.10",
"#schematics/angular": "0.8.9",
"#schematics/update": "0.8.9",
"#types/jasmine": "^2.8.16",
"#types/jasminewd2": "^2.0.8",
"#types/node": "^10.5.8",
"codelyzer": "~4.4.4",
"jasmine-core": "~3.1.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~2.0.4",
"karma-chrome-launcher": "~2.2.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^2.0.6",
"karma-jasmine": "^1.1.2",
"karma-jasmine-html-reporter": "^1.5.1",
"ng-packagr": "^3.0.0",
"node-sass": "^4.13.1",
"protractor": "^5.4.2",
"sass-loader": "^7.3.1",
"ts-node": "~7.0.1",
"tsickle": "^0.38.0",
"tslib": "^1.10.0",
"tslint": "~5.11.0",
"typescript": "^2.9.2"
}
}
any opinion?
The reason you are running into errors is that those packages do not exist in your local verdaccio, but on the regular npm registry.
You could solve this by either:
setting the regular npm registry as an uplink
set a scope for your registry by running npm config set #<scope>:registry <your verdaccio>
now all packages that start with #<scope>/ will be fetched from you verdaccio, but all others will be fetched from npm.
When I run ng build && node server.js from the same directory, everything is ok.
When I run npm build this is my result:
C:\Users\Admin\Desktop\mean-darts-app>npm build
C:\Users\Admin\Desktop\mean-darts-app>
{
"name": "dart-app",
"version": "0.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"build": "ng build && node server.js",
"ng": "ng",
"start": "ng serve",
"test": "ng test",
"pree2e": "webdriver-manager update --standalone false --gecko false",
"e2e": "protractor"
},
"private": true,
"dependencies": {
"#angular/common": "^2.3.1",
"#angular/compiler": "^2.3.1",
"#angular/core": "^2.3.1",
"#angular/forms": "^2.3.1",
"#angular/http": "^2.3.1",
"#angular/platform-browser": "^2.3.1",
"#angular/platform-browser-dynamic": "^2.3.1",
"#angular/router": "^3.3.1",
"axios": "^0.16.2",
"body-parser": "^1.17.2",
"core-js": "^2.4.1",
"express": "^4.15.3",
"rxjs": "^5.0.1",
"ts-helpers": "^1.1.1",
"zone.js": "^0.7.2"
},
"devDependencies": {
"#angular/compiler-cli": "^2.3.1",
"#types/jasmine": "2.5.38",
"#types/node": "^6.0.42",
"angular-cli": "1.0.0-beta.28.3",
"codelyzer": "~2.0.0-beta.1",
"jasmine-core": "2.5.2",
"jasmine-spec-reporter": "2.5.0",
"karma": "1.2.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-remap-istanbul": "^0.2.1",
"protractor": "~4.0.13",
"ts-node": "1.2.1",
"tslint": "^4.3.0",
"typescript": "~2.0.3"
}
}
For custom scripts you need to use:
npm run script_name
or
npm run-script script_name
Look into your server.js file, do you have a server.listen statement on it? No output only means "I've finished executing this program with no errors".