我正在尝试发布一个纯客户端项目 - 即普通的html/js/css文件,在开发期间由nodejs管理.Node创建一个非常深的路径(超过260个字符) - 在node_modules/...内部
虽然我已经完全排除了node_modules:
<ExcludeFoldersFromDeployment>test;node_modules</ExcludeFoldersFromDeployment>
Run Code Online (Sandbox Code Playgroud)
我尝试发布时仍会抛出异常:
Error 1 The "CollectFilesinFolder" task failed unexpectedly.
System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified
file name must be less than 260 characters, and the directory name must be less than 248 characters.
at System.IO.PathHelper.GetFullPathName()
Run Code Online (Sandbox Code Playgroud)
我知道它特别是node_modules,因为手动删除它可以解决问题.
除此之外,排除工作正常('test'文件夹被排除在外).
如何防止这些文件被考虑用于发布?
我目前正在尝试将旧的ASP.NET WebSite项目迁移到Visual Studio 2015.我想使用NPM/Gulp自动将LESS文件编译为CSS(此任务由VS 2013中的WebEssentials完成).
我package.json在项目中添加了一个文件来加载所需的组件.这会node_modules在WebSite项目的根目录中创建一个文件夹,这就是我的问题所在:
由于WebSite项目没有项目文件,因此项目根文件夹中的所有文件(和子目录)都自动成为项目的一部分.由于内部深度嵌套的目录结构node_modules,由于路径名太长,这会导致错误.
一个简单的解决方法是hidden在node_modules文件夹上设置属性(但这必须由每个开发人员手动完成).
有没有办法告诉NPM将节点模块放入另一个目录,例如项目(..\node_modules)上方解决方案文件的一个级别?
或者是否可以从gulp-task(在项目加载时运行)中设置文件夹的隐藏属性?
asp.net vs-web-site-project npm node-modules visual-studio-2015
我正在尝试使用Expo和制作一些组件的演示应用程序react-native。(或者我也可以使用常规React-Native)
我的问题是我无法导入演示应用程序之外的文件
这是我的结构
|-- Components/
| |-- libs
| |-- node_modules
| |-- index.js
| |-- package.json
| |-- demo/
| | |-- node_modules
| | |-- App.js
| | |-- package.json
在的内部demo/App.js,我试图从上层目录导入我的组件之一,但是没有运气。所有组件都在./index.js中导出
在的内部App.js,我尝试了:
import {MyComponent} from 'Components',import {MyComponent} from '../index'或,import {MyComponent} from '../../Components/'但似乎没有任何作用。
我遇到以下类型的错误 Directory /Users/kevin/web/myprojects/Components/index doesn't exist
我究竟做错了什么 ?
我尝试将反应原生声音安装并链接到我的项目中.但是,当我在项目目录中运行以下命令时,
react-native link react-native-sound
Run Code Online (Sandbox Code Playgroud)
库没有链接,我得到以下结果:
Scanning 758 folders for symlinks in /Users/MY_USER_NAME/PROJECT_NAME/node_modules
Run Code Online (Sandbox Code Playgroud)
我认为我的节点或npm设置是错误的.
我正在尝试在我的手机中运行已经构建的应用程序.当我使用"react-native start"代码启动应用程序时,它会在一段时间后返回以下错误消息
ERROR Watcher took too long to load (NodeWatcher)
Error: Watcher took too long to load (NodeWatcher)
at Timeout._onTimeout (index.js:99:16)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
Run Code Online (Sandbox Code Playgroud)
我使用的是Windows 7(32位).对于Windows 7 32位系统,我没有找到任何"Watchman"版本.由于此问题,我在移动设备上安装我的应用后出现以下错误
Reference Error: Can't find varaible: __fbBatchedBridge
Run Code Online (Sandbox Code Playgroud)
编辑:现在我已经将我的系统升级到64位的windows8.但我仍然无法安装守望者.
我在PHP(LAMP服务器)中创建了一个非常简单的网站(如pastebin).该站点使用jquery和bootstrap.我之前使用bower过,但我想转而使用npm.
我的目录结构是这样的:
当我使用bower时,我曾经将整个bower_components文件夹上传到我的FTP服务器.我的node_modules文件夹非常大,包含数百个文件,所以我不确定是否应该上传它?
我想我可以上传的package.json和运行npm install上传后我的web服务器的命令行上,但会node_modules文件夹暴露给公众造成潜在的安全隐患?
=== npm audit security report ===
???????????????????????????????????????????????????????????????????? ? Manual Review ? ? Some vulnerabilities require your attention to resolve ? ? ? ? Visit https://go.npm.me/audit-guide for additional guidance ? ????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????? ? High ? Arbitrary File Overwrite ? ????????????????????????????????????????????????????????????????????? ? Package ? tar ? ????????????????????????????????????????????????????????????????????? ? Patched in ? >=4.4.2 ? ????????????????????????????????????????????????????????????????????? ? Dependency of ? gulp-sass ? ????????????????????????????????????????????????????????????????????? ? Path ? gulp-sass > node-sass > node-gyp > tar ? ????????????????????????????????????????????????????????????????????? ? More info ? https://nodesecurity.io/advisories/803 吗?????????????????????????????????????????????????????????? ??????????????????? 在7659个扫描程序包中发现1个严重漏洞。1个漏洞需要手动检查。有关详细信息,请参见完整报告。
当写入“npm start”时,我收到一些错误消息“找不到模块..\acorn.js”
包.json
{
"name": "eats-mate-frontend",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^13.5.0",
"acorn": "^8.8.0",
"axios": "^0.27.2",
"bootstrap": "^5.1.3",
"react": "^18.2.0",
"react-bootstrap": "^2.4.0",
"react-dom": "^18.2.0",
"react-kakao-maps-sdk": "^1.1.1",
"react-persist": "^1.0.2",
"react-redux": "^8.0.2",
"react-responsive-carousel": "^3.2.23",
"react-router-dom": "^6.3.0",
"react-scripts": "5.0.1",
"redux": "^4.2.0",
"redux-persist": "^6.0.0",
"redux-promise": "^0.6.0",
"redux-thunk": "^2.4.1",
"save": "^2.5.0",
"slick-carousel": "^1.8.1",
"source-map": "^0.7.4",
"styled-components": "^5.3.5",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"browserslist": {
"production": [ …Run Code Online (Sandbox Code Playgroud) NodeJS:v18.7.0
\nNPM:8.15.0
\nrollup.config.js:
import typescript from '@rollup/plugin-typescript';\nimport dts from 'rollup-plugin-dts';\n\nimport tsConfig from './tsconfig.json';\n\nconst config = [\n {\n input: "index.ts",\n output: [{ file: "build/index.js", sourcemap: true }],\n plugins: [\n typescript(\n {\n sourceMap: tsConfig.compilerOptions.sourceMap\n }\n )\n ]\n },\n {\n input: 'build/index.d.ts',\n output: [{ file: "build/index.d.ts", "format": "es" }],\n plugins: [\n dts(\n {\n compilerOptions: {\n baseUrl: tsConfig.compilerOptions.baseUrl\n }\n }\n )\n ]\n },\n]\n\nexport default config;\nRun Code Online (Sandbox Code Playgroud)\ntsconfig.json:
{\n "compilerOptions": {\n "plugins": [\n {\n "name": "@rollup/plugin-typescript"\n }\n ]\n }\n}\n …Run Code Online (Sandbox Code Playgroud) 我们有一个每天晚上都会构建的代码库。昨晚,它无法构建(我没有进行与 NPM 库相关的更改)。
我收到以下错误:
ERROR TS2688: Cannot find type definition file for 'keyv'.
The file is in the program because: Entry point for implicit type library 'keyv'.
Run Code Online (Sandbox Code Playgroud)
我发现 keyv 库不在我的包 json 中,但 package.json 中列出的其他一些包正在使用它。在 package-lock.json 中,我发现 @types/keyv 在多个地方使用。
搜索类型库并查看 package-lock.json 中的更改会导致这一行,这是其链接:
https://www.npmjs.com/package/@types/keyv “这是一个存根类型定义。keyv 提供了自己的类型定义,因此您不需要安装它。”
使用“keyv”的软件包尝试使用已弃用的@types/keyv。
node-modules ×10
npm ×5
node.js ×4
react-native ×3
reactjs ×2
typescript ×2
asp.net ×1
bower ×1
gulp ×1
import ×1
javascript ×1
msbuild ×1
npm-install ×1
php ×1
plugins ×1
publish ×1
rollupjs ×1
security ×1
timeout ×1
tsconfig ×1
types ×1
watchman ×1