我使用 npm install 安装了 ndb 和 Parcel-bundler。
npm 安装ndb --save-dev npm install Parcel-bundler --save-dev
这是我的 package.json 文件中的内容
{
"name": "natours",
"version": "1.0.0",
"description": "Learning node, express, and mongoDB. ",
"main": "app.js",
"scripts": {
"start": "node server.js",
"start:prod": "NODE_ENV=production node server.js",
"debug": "ndb server.js",
"watch:js": "parcel watch ./public/js/index.js --out-dir ./public/js --out-file bundle.js",
"build:js": "parcel watch ./public/js/index.js --out-dir ./public/js --out-file bundle.js"
},
"author": "Yong",
"license": "ISC",
"dependencies": {
"bcryptjs": "^2.4.3",
"cookie-parser": "^1.4.6",
"dotenv": "^16.3.1",
"express": "^4.18.2",
"express-mongo-sanitize": "^2.2.0",
"express-rate-limit": "^7.0.2",
"helmet": "^7.0.0",
"hpp": "^0.2.3",
"jsonwebtoken": "^9.0.2",
"mongoose": "^7.5.2",
"morgan": "^1.10.0",
"nodemailer": "^6.9.5",
"pug": "^3.0.2",
"slugify": "^1.6.6",
"validator": "^13.11.0",
"xss-clean": "^0.1.4"
},
"devDependencies": {
"ndb": "^1.1.5",
"nodemon": "^3.0.1",
"parcel-bundler": "^1.12.5"
}
}
可以找到来自常规依赖项的模块,例如 cryptjs,但由于某种原因找不到 ndb 和 Parcel-bundler。请帮忙。
parcel
才可以使用。$ npm i -D parcel
# OR
$ npm install --save-dev parcel